error_highlight
error_highlight copied to clipboard
Handle very long line well
$ ruby t.rb
t.rb:1:in `<main>': undefined method `gsuub' for "fooo
oooooooooooooooooooooooooooooooooooooooooooooooooooooo
ooooooooooooooooooooooooooooooooooooooooooooooooooo":S
tring (NoMethodError)
"foooooooooooooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooooooooooooooo
oo".gsuub(//, "")
^^^^^^
Did you mean? gsub
Should we truncate such a long code snippet to fit it with the width of terminal?

This might be another argument for using bold or xterm color in addition or alternatively to ^^^ style.
Should we truncate such a long code snippet to fit it with the width of terminal?
Hey @mame, I share the same understanding, and I believe that’s a good idea (I’ve noticed other similar tools adopting the same approach). I’ve left a proposal here: https://github.com/ruby/error_highlight/pull/51