
What Even is “Monkey Patching” in Ruby?
What is monkey patching? Why is it so prevalent in the ruby community? How can you “monkey patch” existing code?
“Monkey Patching” (or monkey-patching?) is normally met with skepticism in programming communities. However, some, like the Ruby community, found it to be a powerful tool for creating a “natural, but not simple” language, solving problems, and rapidly experimenting. Today, any Rails app relies heavily on patches to the point that Rails is often mistaken for Ruby.
This talk exposes people to monkey patching, with a focus on how it’s done in Ruby, and discusses a somewhat forgotten feature added to Ruby to make monkey-patching more sane. Of course, there is also a touch of philosophy regarding the power of languages and allowing programmers the ability to, if desired, completely rewrite the language itself.