Is overriding to_s methods in Ruby bad? [closed]

No, you should feel free to override to_s – there are no ill side-effects. As long as your new to_s is more informative than the built-in (not exactly a high standard there), you’re in the clear.

And they help make your test failures read better – sometimes by a lot – which is never a bad thing. Go for it!

Leave a Comment