From: "Aníbal Rojas" Date: 2010-03-20T21:41:09+09:00 Subject: Re: Question about the evaluation of x = 'foo' if false Thanks for your responses! -- Aníbal On Mar 18, 2:44 pm, Mark Thomas wrote: > On Mar 17, 12:01 pm, Aníbal Rojas wrote: > > > Hello, > > >    I am kind of lost with thenilresult while I am expecting a false: > > > irb(main):001:0>  x = 'foo'iffalse > > =>nil > > irb(main):002:0> x > > =>nil > > irb(main):003:0>  x = 'foo'iftrue > > => "foo" > > irb(main):004:0> x > > => "foo" > > >    Thanks in advance for sharing your knowledge, > > Another way to think about it is that the above constructs are > alternate ways of expressing the following: > > iffalse then x = 'foo' endiftrue then x = 'foo' end > > -- Mark.