Ruby difference between send and instance_eval?
问题 I know send takes string or symbol with arguments while instance_eval takes string or block, and their difference could be apparent given receivers. My question is what the ' under the hood ' difference is for the example below? 1234.send 'to_s' # '1234' 1234.instance_eval 'to_s' # '1234' 回答1: From the fine manual: send(symbol [, args...]) → obj send(string [, args...]) → obj Invokes the method identified by symbol , passing it any arguments specified. [...] When the method is identified by a