On Mar 17, 12:01=A0pm, An=EDbal Rojas <anibalro... / gmail.com> wrote:
> Hello,
>
> =A0 =A0I am kind of lost with the nil result while I am expecting a false=
:
>
> irb(main):001:0> =A0x =3D 'foo' if false
> =3D> nil
> irb(main):002:0> x
> =3D> nil
> irb(main):003:0> =A0x =3D 'foo' if true
> =3D> "foo"
> irb(main):004:0> x
> =3D> "foo"
>
> =A0 =A0Thanks in advance for sharing your knowledge,


Another way to think about it is that the above constructs are
alternate ways of expressing the following:

if false then x =3D 'foo' end
if true then x =3D 'foo' end

-- Mark.