Eero Saynatkari wrote:

> Is it possible to change NilClass#to_s to return "nil"
> rather than "" since "" != nil?

#!/usr/bin/ruby -w

class NilClass
  def to_s
    return "nil"
  end
end

p nil.to_s

"nil"

You may not want to do this. There might be a reason for the present
behavior. But it is very easy to do, as are all such changes in Ruby.

-- 
Paul Lutus
http://www.arachnoid.com