From: Brian Candler Date: 2010-06-15T00:53:39+09:00 Subject: Re: Loading a module without polluting my namespace Hagbard Celine wrote: > Thanks for your reply but I'm afraid that doesn't solve my problem. I > stumbled upon the optional argument of `load' as well but it prevents me > from accessing the loaded module. I wish 'load' would simply return the anonymous module it has created, but there are nasty workarounds. For example: $ cat foo.rb module Foo def bar puts "hello" end module_function :bar end $res = Foo $ irb --simple-prompt >> load "foo.rb", true => true >> $res => #::Foo >> $res.bar hello => nil -- Posted via http://www.ruby-forum.com/.