From: Joel VanderWerf Date: 2007-08-07T05:13:31+09:00 Subject: Re: class String in a module Gabriel Dragffy wrote: > Hi all > > I have a module file which contains 'class String' and a couple of > custom methods for me to add to Object::String. So I do something like: > require 'mystring' or load or whatever. It doesn't extend String's > functionallity... no doubt because the modules contents are isolated in > their own namespace... How to get around that? Use the global scope operator (at least I think that's what it's called): module M class ::String def backwards; reverse; end end end puts "24".backwards # => 42 -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407