> 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.

(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

Reply via email to