X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109 Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!nospam.fr.eu.org!talisker.lacave.net!lacave.net!not-for-mail From: Karolis Juodele Newsgroups: comp.lang.ruby Subject: Run time programming Date: Wed, 4 May 2011 05:39:52 -0500 Organization: Service de news de lacave.net Lines: 16 Message-ID: <4a3b01fe4541e66cacac809c4625a46b@ruby-forum.com> NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1304505618 64025 65.111.164.187 (4 May 2011 10:40:18 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Wed, 4 May 2011 10:40:18 +0000 (UTC) X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 382627 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: <4a3b01fe4541e66cacac809c4625a46b@ruby-forum.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:3915 Hi all, How can I run ruby code from my ruby program? Let's say I have a program with a text box. In that text box user writes a ruby function. I want the program to call that function in such way that this function would have access to the classes and variables in the main program. How can this be done? I imagine that since Ruby is interpreted dynamically adding code shouldn't be much of a problem. But then I just started learning Ruby and have no idea how this could work.. Thanks for your replies. -- Posted via http://www.ruby-forum.com/.