👩💻 Join our community of thousands of amazing developers!
What does the following code do? If you answered "it upcases two strings and adds them together, returning the result" you might be wrong because of a new Ruby feature called "refinements".Let's start with the problem refinements are supposed to solve: monkey-patching.Monkey-patchingIn Ruby, all classes are mutable. Indeed, when you define a new class, you're really just creating an empty class and filling it with methods. The ability to mutate classes at runtime has been used (or abused) by man...