D
Dominik Bathon
Hi,
I am looking for a way to do the equivalent of the following ruby functio=
n =20
in a C extension:
def foo(my_proc)
bar(&my_proc)
end
(and it should also work if bar is instance_eval or module_eval)
I couldn't find a way to do this, the only idea I have is to do something=
=20
like:
def foo(my_proc)
bar { |arg| my_proc.call(arg) }
end
This can be done using rb_iterate, but it obviously doesn't work with =20
instance_eval and module_eval.
Any ideas?
Dominik
I am looking for a way to do the equivalent of the following ruby functio=
n =20
in a C extension:
def foo(my_proc)
bar(&my_proc)
end
(and it should also work if bar is instance_eval or module_eval)
I couldn't find a way to do this, the only idea I have is to do something=
=20
like:
def foo(my_proc)
bar { |arg| my_proc.call(arg) }
end
This can be done using rb_iterate, but it obviously doesn't work with =20
instance_eval and module_eval.
Any ideas?
Dominik