Beware subclassing Ruby core classes

from blog Steve Klabnik, | ↗ original
Jul 24 2013 TL;DR: Subclassing core classes in Ruby can lead to unexpected side effects. I suggest composition over inheritance in all these cases. Subclassing Review If you’re familiar with the concept of subclassing, skip down to “The Problem.” In Ruby, you can make your own classes: class List end You can also make...