From: Daniel Finnie Date: 2008-01-08T09:25:30+09:00 Subject: Re: Using string variable to call a method ------=_Part_28319_10525951.1199751935708 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline In general, the send method is preferred over evalling a string when possible. In addition to send "say_#{str}", you can do method("say_#{str}".to_sym) .call. Dan On 1/7/08, Thomas Wieczorek wrote: > > You can use: eval, instance_eval, class_eval, module_eval oder send > The different evals are described here: > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/192513 > (click on the "N" to read the next message in the thread) > send is as far as I understand it, used to send messages to objects. > Keep in mind that method calls are messages send to objects. > > ------=_Part_28319_10525951.1199751935708--