- 28 August 2016
- Ruby
- Ruby 2 - Refinements
Refinements has been added to Ruby to replace popular, but bad approach called Monkey Patching.
Let's check what Monkey Patching is and why it is bad.
For example, we have a class User
, which has method to_s
: