From: Rick DeNatale Date: 2007-12-25T06:18:19+09:00 Subject: Re: Monkey-patching with modules On Dec 24, 2007 4:08 PM, Mike Holly wrote: > module Foo > class String > def hi > puts 'hi' > end > end > end > > include Foo > > x = "hello" > x.hi > > Why does this not work? A module is a namespace, so constant names defined inside a module are nested within the module. You've defined a new class named Foo::String which is not the same class as String (a.k.a. ::String) -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/