From: Greg Hurrell Date: 2007-01-26T06:35:07+09:00 Subject: Adding methods to String, but only in my own Module? Is there any way to add methods to the String class, but only within the scope of a particular module? Example: adding a "fantastic" method to String: class String def fantastic self + "fantastic" end end Now, given the limited usefulness of the "fantastic" method, I'd like to be able to confine its impact to my Module only: # outside of my module this should raise a NoMethodError "foo".fantastic class Example def example "foo".fantastic # should work end end I suspect the answer is going to be no, but wanted to ask anyway... Cheers, Greg