Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
'move into' a module's namespace in irb
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="David A. Black, post: 4642289"] Hi -- 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 -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting & training: [URL]http://www.rubypal.com[/URL] Now available: The Well-Grounded Rubyist ([URL]http://manning.com/black2[/URL]) "Ruby 1.9: What You Need To Know" Envycasts with David A. Black [URL]http://www.envycasts.com[/URL] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
'move into' a module's namespace in irb
Top