From: mengx@... Date: 2002-01-01T00:32:44+09:00 Subject: [ruby-talk:29860] Re: A Bug or something else? It works. Thanks. But would it have any side effects? I wonder why "private" did not disable the outside access to "nil". I asked a question before about the reasoning for the existence of methods for "nil", such as "to_a", "to_i", "to_s". Can an exception be raised for this scenario and the one below? a = nil a == 1 => false (even after the undef) "a=nil" may be seen as creating a variable but no real value assigned yet. Should the "a == 1" be invalid? Thanks -Ted > > m> to "" in most cases. Can it be changed, at least when I disable the "to_s" > m> method ? > > undef the methods rather than make it private > > class NilClass > undef to_s, to_a, to_i > end > > > > Guy Decoux >