2010/8/23 Ralph Shnelvar <ralphs / dos32.com>: > Is my understanding correct that === is not a symmetric operator? ¨Âèáô¬ éî æáãô> ¨Â ½½> and > ¨Â ½½> > mean different things? Exactly. > - - - - - > irb(main):001:0> class X > irb(main):002:1> end > => nil > irb(main):003:0> x = X.new > => #<X:0x4d3a660> > irb(main):004:0> x === X > => false # this is surprising > irb(main):005:0> X === x > => true this is the test I want ... but was surprised when > # x === X didn't work. > irb(main):006:0> > - - - - - > > Does x === X ever mean anything useful? That depends on what objects x and X refer to. Remember that X is only a constant - and not a class or module automatically. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/