From: elathan@... Date: 2003-12-12T19:04:19+09:00 Subject: getting a method from a block in C Hello! Suppose I have some ruby code: def bar puts "Hello" end foo { bar } Now, foo is part of a Ruby extension, but bar is user implemented. The C implementation of foo can use rb_block_given_p() to identify if it was called with a block. My question is: can I grab the bar method, save its pointer somewhere and call it from other places in my code? I.e. is there an option in the Ruby C API to parse/identify args in a given block? I don't want to yield bar, just save it and call it later (foo is actually a C++ constructor, which takes as an argument a pointer to a user function). Regards, -- Elias