From: Avdi Grimm Date: 2012-06-21T02:14:27+09:00 Subject: Re: Looking for a better way to add a method to a core class than monkey patching --0016e6dd89d5d6327b04c2ea87ae Content-Type: text/plain; charset=ISO-8859-1 On Tue, Jun 19, 2012 at 9:51 PM, Henry Maddocks wrote: > > I think the OP's question has shown the right approach. He understands the > dangers so, in an effort to improve his skills, he has asked the question, > how can he use this technique in a way that will cause the least amount of > problems. We should be encouraging this. > > And I answered the OP's question: he can cause the least amount of problems by confining monkey-patching to his own apps, not in publicly distributed gems. Or, if putting it in a gem, making it part of the publicly advertised feature set of the gem, not a hidden surprise. -- Avdi --0016e6dd89d5d6327b04c2ea87ae Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Jun 19, 2012 at 9:51 PM, Henry Maddocks <hmaddocks@me.com> wrote:

I think the OP's question has shown the right approach. He understands = the dangers so, in an effort to improve his skills, he has asked the questi= on, how can he use this technique in a way that will cause the least amount= of problems. We should be encouraging this.


And I answered the OP's=A0question: he can cause the least amount= of problems by confining monkey-patching to his own apps, not in publicly = distributed gems. Or, if putting it in a gem, making it part of the publicl= y advertised feature set of the gem, not a hidden surprise.

--
Avdi
--0016e6dd89d5d6327b04c2ea87ae--