From: Avdi Grimm Date: 2008-05-17T06:19:57+09:00 Subject: Re: Monkey Patching (definition)? On Fri, May 16, 2008 at 3:48 PM, Florian Gilcher wrote: > I define monkey-patching as "opening and changing behaviour of a > method/class > in the knowledge that other classes/libraries depend on it". I think this is one of the best definitions I've seen. It should be remembered that the term arose in specific circumstances: it came from the practice of dynamically modifying the behavior of *existing* code. Hence "patching", rather than "monkey extending" or "monkey adding". Of course, it's not as clear-cut as all that because sometimes one coder's extension is another coder's unexpected change in behavior. But the spirit of monkey patching is that of altering existing code so that it behaves differently - to temporarily fix a bug without altering the source, for instance. -- Avdi Home: http://avdi.org Developer Blog: http://avdi.org/devblog/ Twitter: http://twitter.com/avdi Journal: http://avdi.livejournal.com