3 ms·
This post discusses MRI 2.4, but I discovered this the hard way in Ruby 3.0 when I tried to use instances of a custom String subclass as Hash keys. The conventi
by Lammy 5y ago
This post discusses MRI 2.4, but I discovered this the hard way in Ruby 3.0 when I tried to use instances of a custom String subclass as Hash keys. The conventional wisdom is "don't subclass built-in types" but nobody tells you why not :)