From: "Cédric Foll" Date: 2002-10-18T00:27:25+09:00 Subject: Re: behaviour of nil > However he also stated that it worked in Perl which to me shows that he > has not thinking in terms of object / method / reciever but in terms of > type coercion of a non OO language. No ! Be sure that "he has thinking in terms of object / method / reciever" ;-). I say that because i'm transleting the receipes of "Perl Cookbook" in Ruby (pleac.sf.net) and so i have to deal with Perl code. I was thinking of something like class NilClass def +(other) other if (other.type == Array) or ... raise "method + of nil not defined for this object" end end and nil = nil + 1 won't cause a problem is u don't define the method '=' for nil. But I'm sure that, if Dave says that it is a bad thing, he's right ;-).