4 ms·
You could always extend the singleton object before to avoid global monkey-patching. But the real lesson is probably just if you're not writing ActiveSupport,
by ssmoot 13y ago
You could always extend the singleton object before to avoid global monkey-patching.
But the real lesson is probably just if you're not writing ActiveSupport, don't do global monkey patches at all. Favor inheritance and composition. Especially in your own libraries where it's easier to ensure a global patch doesn't break your code.