Refinements are a feature of Ruby intended to reduce the impact of monkey patching on other users of the monkey-patched class. Refinements provide a way to extend a class locally rather than globally.
Refinements are a feature of Ruby intended to reduce the impact of monkey patching on other users of the monkey-patched class. Refinements provide a way to extend a class locally rather than globally.
Due to Ruby’s open classes you can redefine or add functionality to existing classes. But as long as the scope of such changes is global, unintended side-effects or breakage of programs may occur.
Read more on the docs.