[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

module_eval question

jrmair

8/10/2008 4:00:00 PM

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)
--
Posted via http://www.ruby-....

1 Answer

Tim Hunter

8/10/2008 4:41:00 PM

0

John Mair wrote:
> 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.


--
RMagick: http://rmagick.ruby...