Ruby C: How to call "call" method on a Proc instance (in C)?

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.

···

--
Iñaki Baz Castillo
<ibc@aliax.net>

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

···

--
Posted via http://www.ruby-forum.com/.

Good to know, thanks a lot.

···

2011/10/29 Admin Tensor <admin@tensor.heliohost.org>:

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().

--
Iñaki Baz Castillo
<ibc@aliax.net>