Re:Responsible Monkeypatching in Ruby
by lovegoblin on Friday August 27, 2021 @01:32PM
(#28330661)
> Activesupport is hugely widespread, yeah. It's a bit unfortunate since it provides so much
Even this is becoming less and less necessary as more of the commonly-used syntactic sugar gets pulled into Ruby core.
But beyond that though, the vast majority of issues I've seen with monkey patching has been stuff that was created in the project/company that's experiencing the problems. Libraries are generally very good about how they monkeypatch (because doing it wrong with hundreds of using-projects VERY quickly runs into problems), but those ad-hoc internal monkeypatches are routinely done by people who don't fully understand what they're doing, or take shortcuts. Those can have latent bugs linger for a very long time, and yeah - they can be nasty to unravel.