From: "David A. Black" Date: 2008-12-29T21:16:55+09:00 Subject: Re: use not equal(!=) operator as a Symbol. Hi -- On Mon, 29 Dec 2008, Ryan Davis wrote: > > On Dec 28, 2008, at 22:58 , Jun Young Kim wrote: > >> irb(main):008:0> a.send('!=', 2) >> NoMethodError: undefined method `!=' for 1:Fixnum >> from (irb):8:in `send' >> from (irb):8 >> from :0 > > there is no '!=' method, there is only '=='. you should send '==' and not/! > the result: > > ! a.send('==', 2) In 1.9 != becomes a method: $ ruby19 -ve 'p 1.send("!=", 2)' ruby 1.9.1 (2008-12-14 revision 20738) [i386-darwin9.5.0] true David -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting & training: http://www.rubypal.com Coming in 2009: The Well-Grounded Rubyist (http://manning.com/black2)