Why not just guard it?

answer = nil && nil + 12.0

On 28 Apr. 2017 12:25 am, "Andy Jones" <Andy.Jones / jameshall.co.uk> wrote:

> >>>>
>
> I will give it a go (but will that cope with "12.0 + nil" ?)
>
> <<<<
>
>
>
> See Dan Fitzpatrick”Ēs answer. In short, yes; you can now patch Float etc
> safe In the knowledge that you are only effecting your own weird nil class.
>
>
>
> The only buggeration is that you can”Ēt subclass operators like + in Ruby
> so you may have to resort to `MyNil.add 12.0`?
>
>
>
>
> 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>