From: Andrew Walrond Date: 2005-04-02T08:34:44+09:00 Subject: Re: Kernel.load() behaviour On Friday 01 April 2005 23:57, Andrew Walrond wrote: > > On a related note, if glibc.rb does require(filename) or > load(filename,false), this second level load breaks through and will > pollute the top level global namespace. I suppose this is the obvious, > though unwanted behavior. > My final solution, taking the above into account: c.rb class Glibc end b.rb inline 'c.rb' class Gcc end a.rb module Packages def Packages.inline(filename) eval(IO.readlines(filename).join,nil,filename) end inline('c.rb') end Packages::Gcc.new Packages::Glibc.new Nice and neat :)