From: Tim Hunter Date: 2007-12-16T08:59:49+09:00 Subject: Re: string to code? Pavel Pvl wrote: > is it possible to get user input, and put that in as a code. like lets > say i ask for command and the user types types something like twice 3 > which would refer to to a method twice n?? Well, you can certainly use the eval method, which just executes a string as Ruby code, but there is some risk involved. You probably wouldn't want to allow somebody to type system('del *.*') for example. Unless you're very smart and very careful (like _why: http://tryruby.hobix.com/) you shouldn't allow the user to type in real Ruby code. -- RMagick: http://rmagick.rubyforge.org/