From: Rick DeNatale Date: 2009-06-21T02:25:33+09:00 Subject: Re: 'move into' a module's namespace in irb On Sat, Jun 20, 2009 at 12:36 PM, David A. Black wrote: > On Sun, 21 Jun 2009, Max Williams wrote: >> ah, ok.  I thought that >> >> "hello" >> >> was the same thing as >> >> String.new("hello") >> >> , though?  Or, does it bypass the usual lookup table for methods? > > It bypasses. The literal constructors aren't hooked in to the > method-based constructors: Also consider that if "Hello" were equivalent to String.new("Hello") it would in turn be equivalent to String.new(String.new("Hello")) and String.new(String.new(String.new("Hello"))) etc. ad infinitum, ad nauseam. So literals need to be reified at parse time to avoid this infinite regression. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale