Back to Developer Roadmap

Monkey Patching

src/data/roadmaps/ruby/content/monkey-patching@6mCtbDW5pkFQdLSjsr_Ad.md

4.0735 B
Original Source

Monkey Patching

Monkey patching is a technique that allows you to add, modify, or replace existing code in a class or module at runtime. This means you can change the behavior of classes and modules, even those defined in external libraries, without directly altering their source code. It's a powerful tool for extending functionality or fixing bugs, but it should be used with caution as it can lead to unexpected side effects and make code harder to maintain.

Visit the following resources to learn more: