From: James Gray Date: 2008-02-27T22:46:43+09:00 Subject: Re: Monkeypatching is Destroying Ruby On Feb 24, 2008, at 10:02 PM, James Gray wrote: > On Feb 23, 2008, at 4:23 PM, Eric Mahurin wrote: > >> I usually only do monkey patching in the >> following cases which have no reuse: top-level script, testing, and >> quick hacking. > > I think it's the ideal tool for adding compatibility methods. Along these lines, I read a chapter in Design Patterns in Ruby last night that suggests using Ruby's open classes as one possible way to implement the Adapter pattern. The book includes a pretty good discussion of the plusses and minus to this approach and makes recommendations about when it's probably worth the trade-off. It's a good read. James Edward Gray II