On Jan 21, 2008 8:22 AM, Jim Lindley <[EMAIL PROTECTED]> wrote: > > I'm 99 44/100% sure that you have it right. The expression x != y is > > syntactic sugar for !(x == y) much like x += y is syntactic sugar for > > x = (x +y) > > > > The parser turns these into an internal representation (abstract > > syntax tree for 1.8, byte-codes for 1.9) which is identical to the > > second form. > > > > In 1.8 it's just syntactic sugar. But 1.9 provides actual != and !~ > methods so that you can override it in situations like this.
Oooooh. Good to know. We're not 1.9 compatible yet, but when we get there we'll definitely add this! > > (from Ruby-Core: http://www.ruby-forum.com/topic/134608 ) > > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users