From: mengx@... Date: 2002-01-03T02:28:25+09:00 Subject: [ruby-talk:30059] Re: A Bug or something else? > > m> I assume it is "to_s", right?, If the ruby is writen in ruby, > m> would it first evaluated as "#{a.to_s}" ? > > it will evaluated > > "" + a + "" > > and it try to convert `a' to a String by calling #to_s > So at least for "#{a}", Ruby interpreter directly calls "to_s" without checking access permission. class NilClass def to_s "ss" end private :to_s end "#{nil}" -> "ss" nil.to_s -> "undefined" What is opinion on the rationale of "nil" -> "" ? Thanks -Ted