From: Brian Candler Date: 2007-03-26T03:11:45+09:00 Subject: Re: pointer to function On Mon, Mar 26, 2007 at 01:40:05AM +0900, ekkehard.horner wrote: > def sendSym > methods = { 'sym0' => [ 'using :tell_it' , :tell_it ] , > 'str0' => [ 'using "tell_it"', "tell_it" ] , > } > methods.each { |keyval| send keyval[ 1 ][ 1 ], keyval[ 1 ][ 0 ] } > end > # Does send 'symbolize' the string? todo: check > # http://www.troubleshooters.com/codecorn/ruby/symbols.htm Yes, send allows you to pass either a string or a symbol. The symbol is actually used for method dispatch; if you pass a string then it will convert it into a symbol first (you can do this explicitly using String#to_sym or String#intern; I think they are just aliases) Regards, Brian.