Greetings,

is it possible to supply Proc arguments to a constructor of
a class in a C extension so that it keeps these references for later
usage?

I'd like to do something like this:

p1 = Proc.new {|x| ...}
p2 = Proc.new {|x| ...}
a = Foo::new(p1, p2)
...
a.bar # evaluates p1 and p2

where Foo is a C extension:

static VALUE Foo_new(VALUE class, VALUE proc1, VALUE proc2) {
 // do what?
}

I've been playing with rb_funcall and rb_f_lambda but haven't come up
with a solution. Maybe proc_new in eval.c is the right thing?

Thanks for you help!
Arno
---
Arno Erpenbeck <aerpenbe / uos.de>
University of Osnabrueck