Probably precedence.

    nil && (nil + 12.0)

?

Cheers


On 5 May 2017 20:48, "Andy Jones" <Andy.Jones / jameshall.co.uk> wrote:

>>>>>>>>
Why not just guard it?

answer = nil && nil + 12.0
<<<<<<<<

Perhaps I am being dense, but I don”Ēt think that does what you think it
does:

    %:  irb
    irb(main):001:0> nil && nil + 12.0
    => nil
    irb(main):002:0> nil && 2.0 + 12.0
    => nil

It rather looks as if it returns nil under all circumstances?


Click here to view Company Information and Confidentiality Notice.<
http://www.jameshall.co.uk/index.php/small-print/email-disclaimer>

Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
(supressed text/html)
Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>