From: "zimbatm ..." Date: 2009-06-10T06:08:04+09:00 Subject: Re: monkeypatch-0.1.2 (alpha) Hi ruby fellows, I'm back ! The discussion was mainly oriented on the stricktness of the patch application. Should it raise an error ? Should it just output a warning ? Here is my point of view: I'd like to differentiate two things. Changing code inside and outside from your project. What monkeypatch tries to do, it to give some protection when you patch external code, because you have less control on it (it might be upgrade to the latest version and you don't know). When you're changing your own code, then it's your responsibility to do it right. This is why I believe that patches should be strict and must apply to three things: * Be coherent (not adding a method and then replace it in the same patch for example). In that case, it should give you an early warning by raising and exception. * Only apply if some conditions, like if the bug still exists, are met. If not, don't apply the patch. * Finally, if the patches applies, it should not do unexpected things, like renaming a method that doesn't exist. This is the second case where it should raise. Cheers, zimbatm -- Posted via http://www.ruby-forum.com/.