From: Max Williams Date: 2009-06-21T01:28:14+09:00 Subject: Re: 'move into' a module's namespace in irb David A. Black wrote: > Hi -- > > On Sun, 21 Jun 2009, Max Williams wrote: > >>>> String.new.class >> a weird way. > When you do irb M, you're putting M before all else in the constant > resolution path. So String.new is really M::String.new. "hello" is > still a ::String (top-level, core String class), because the existence > of M::String does not affect the behavior of the literal quotation > marks (which create a ::String). > > > David 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? -- Posted via http://www.ruby-forum.com/.