module_eval question

J

John Mair

hey guys, im looking at the C API function rb_mod_module_eval() and i
dont
entirely understand the parameters being passed to it. can someone
please
explain how to use the rb_mod_module_eval() function ? (note im asking
about the
C API function not the ruby module_eval function, thanks :D)
 
T

Tim Hunter

John said:
hey guys, im looking at the C API function rb_mod_module_eval() and i
dont
entirely understand the parameters being passed to it. can someone
please
explain how to use the rb_mod_module_eval() function ? (note im asking
about the
C API function not the ruby module_eval function, thanks :D)

Looks like it corresponds fairly closely to Module#module_eval.

If there is a code block available to be yielded to, it takes no
arguments and yields to the block. Otherwise, it takes at least 1
argument, a string to be eval'd. You can also supply a 2nd argument or a
3rd argument, which are used as the file name and line number,
respectively, in any error messages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,661
Latest member
FloridaHan

Latest Threads

Top