Hi --

On Thu, 30 Mar 2006, Robert Dober wrote:

> It all comes down to the following decision you have to make:
> (A) Somebody might rely on
>   "a" =~ nil returning false
> in that case abandon!!! (and ask yourself why you have posted that
> question!)
>
> (B) Matching with nil is probably a mistake that will break the code later,
> in other words your astonishement about that behaviour will be "common
> sense", in that case the above extension of a core class is just a great
> idea.

(B) is where the dangers lie. You may think that someone who uses a
particular feature of Ruby is not programming well, but still, it's
only yourself that you punish by making your code incompatible with
the language :-)


David

-- 
David A. Black (dblack / wobblini.net)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" chapters now available
from Manning Early Access Program! http://www.manning.com/books/black