2010/8/23 Ralph Shnelvar <ralphs / dos32.com>:
> Is my understanding correct that =3D=3D=3D is not a symmetric operator? =
=A0That, in fact,
> =A0X =3D=3D=3D x
> and
> =A0x =3D=3D=3D X
>
> mean different things?

Exactly.

> - - - - -
> irb(main):001:0> class X
> irb(main):002:1> end
> =3D> nil
> irb(main):003:0> x =3D X.new
> =3D> #<X:0x4d3a660>
> irb(main):004:0> x =3D=3D=3D X
> =3D> false =A0 # this is surprising
> irb(main):005:0> X =3D=3D=3D x
> =3D> true =A0 =A0# this is the test I want ... but was surprised when
> =A0 =A0 =A0 =A0 =A0 # x =3D=3D=3D X didn't work.
> irb(main):006:0>
> - - - - -
>
> Does x =3D=3D=3D 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

--=20
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/