From: Ian Macdonald Date: 2002-04-25T15:35:56+09:00 Subject: appending methods to class inside module Hi, Please observe the following code: module Dog class String def bark puts "Woof!" end end end include Dog foo = "bar" foo.bark When run, this happens: ./fooz:14: undefined method `bark' for "bar":String (NameError) For some reason, the Dog module is preventing the bark method from being appended to the String class. My question is: how can I get String#bark to be defined, so that I can then call the bark method on foo? Ian -- Ian Macdonald | If Beethoven's Seventh Symphony is not by ian@caliban.org | some means abridged, it will soon fall into | disuse. -- Philip Hale, Boston music | critic, 1837 |