The intent was to return nil when the first value was nil.
That was the op's issue.
If one of the values was nil, she/he wanted nil.

Nil && anything_else will always return nil, and I will not evaluate the
second clause.

On 8 May 2017 6:51 pm, "Andy Jones" <Andy.Jones / jameshall.co.uk> wrote:

> >>>>>>>>
> It should be:
>     2.0 && 2.0 + 12.0
> <<<<<<<<<
>
> Ah! Yes, that works.
>
>
> 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>