@floehopper it's not gonna break Mocha. The method is defined in Object, you define yours in a subclass, it has precedence.
It's like redefining any other method from `Object` in a subclass, e.g. `#to_s` or `#inspect`.
The reason it broke in RSpec is because they were dynamically copying methods over and were not ignoring methods inherited from objects.
RT @GregMolnar@twitter.com
In Ruby 3.2.0, ERB::Util.html_escape is made faster than CGI.escapeHTML, by no longer allocating a String object when no character needs to be escaped.
It also skips calling #to_s method when an argument is already a String..
π¦π: https://twitter.com/GregMolnar/status/1607752212750520320
@gd @penryu My deal with types in Ruby is that I often do not care what a thing is so long as it acts like another thing. Frequently I can just say "Enumerable" but other times, I only care I can #to_s something and what that is doesn't matter. #call is another one of those. Is it a class, class instance, proc, lambda, ...? I don't care. I'm simply #call'ing whatever. The dominant Ruby type systems don't handle this case well.
@MoskitoHero
Ehh, but that immediately makes me think of πΈππππππ#ππ_π(πΈ). Maybe #ππ_ππππ since #Ruby doesn't actually have a 'Boolean' class?
/me shrugs