From: Garance A Drosehn Date: 2006-02-20T11:23:57+09:00 Subject: Re: If statement and if modifier not equivalent? ------=_Part_7224_6946399.1140402222112 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 2/19/06, Mark James wrote: > > I was under the impression that the if modifier and the > if statememt were equivalent, but for the following code > calling A.test raises an exception, while calling A.test2 > succeeds. This is with Ruby 1.8.4. > > class A > def A.test > a if a=3D1 > end > > def A.test2 > if a=3D1 > a > end > end > end > > Do you really want 'if a =3D 1' there, and not 'if a =3D=3D 1'? -- Garance Alistair Drosehn =3D drosihn@gmail.com Senior Systems Programmer Rensselaer Polytechnic Institute; Troy, NY; USA ------=_Part_7224_6946399.1140402222112--