Austin Ziegler wrote:

>I don't think that's what Gavin said at all. I don't particularly consider 
>your additions to NilClass to be "acceptable." I certainly treat nil as a 
>non-value, not an empty value. If I think that I might get a nil value, I 
>*always* test for #nil?. It might be okay to have NilClass#to_s (or is it 
>#to_str) return '' (nil-string),
>
Personally I'd prefer to not even have Nilclass#to_s since it converts a 
false value into a true value which to me seems to be unintuitive.

Also I'd prefer

put nil

to print nil rather than an empty string

Nilclass#to_str would be even worse since that would allow code like

x = nil
puts x + "a string" #=> "a string"

if x wasn't supposed to be nil then that could lead to a lot of long 
debugging sessions


Best regards

Mark Sparshatt