Hi, in a Ruby C extension I handle a Ruby Proc instance and need to
invoke its method “call” (by also passing some arguments).
How to do that?
I know that I can use rb_funcall(), but hopefully there is a faster C
function. However I couldn’t find it in proc.c.
Thanks a lot.
Hi,
In 1.8.6 it is called “proc_call(VALUE proc, VALUE args)” in eval.c. In
1.9.2 I think it is declared as “rb_proc_call(VALUE, VALUE)” in
intern.h. Therefore I think it is probably better to stick with
rb_funcall().
Regards,
Bill
2011/10/29 Admin T. [email protected]:
In 1.8.6 it is called “proc_call(VALUE proc, VALUE args)” in eval.c. In
1.9.2 I think it is declared as “rb_proc_call(VALUE, VALUE)” in
intern.h. Therefore I think it is probably better to stick with
rb_funcall().
Good to know, thanks a lot.