On 02.12.20 15:55, Ralph Mellor wrote:
On Wed, Dec 2, 2020 at 7:08 AM Patrick R. Michaud <pmich...@pobox.com> wrote:
Nil.any_non_existent method always seems to return Nil.  I'm not sure where 
this is documented

It's near the top of the `Nil` doc page you linked:

Any method call on `Nil` of a method that does not exist ... will succeed and 
return `Nil`.


OK, that is intentional and documented then. What is actually the rationale for such a behaviour?

For me it was an unexpected trap as I had a chain of methods which should do some side effect. It all went fine only the side effect was not there. I then figured out after some time that one of methods returned Nil and somehow silently it did not do what I expected.

Thanks

Konrad

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to