error_highlight
error_highlight copied to clipboard
The gem enhances Exception#message by adding a short explanation where the exception is raised
Line 31 in base.rb has a broken link: ``` # (e.g., Array#[] of +ary[(newline)expr(newline)]+), the method will return nil. ```
I'm working on new feature for ruby's test/unit tool and I define `Test::Unit::TestCase.const_missing`. It does some stuff then calls old const_missing like the following (pseudo code): ```ruby orig = self.method(:const_missing)...
Currently, `error_highlight` spots the deepest Ruby frame. This may show code in a gem, which may not be very useful for application writers. Consider: ```ruby # gem code class SomeGem...
``` $ ruby t.rb t.rb:1:in `': undefined method `gsuub' for "fooo oooooooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooooooo":S tring (NoMethodError) "foooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooo oo".gsuub(//, "") ^^^^^^ Did you mean? gsub ``` Should we truncate such a...
https://github.com/ruby/error_highlight/blob/9fbaa8ab7c09257320afb39ae4619251362291b1/lib/error_highlight/formatter.rb#L16 I believe it would be prudent at least for the first stable release of this gem, to remove the `ErrorHighlight#formatter` override. I believe it will be very hard to...
Currently, error_highlight does not handle Unicode characters well. There are two subissues. 1. Ruby::AST::Node#first_column and #last_column seem to return the column in bytes, but String#match handles the index in characters....
Due to the design limitation of the ruby internal API (`RubyVM::AST.of`), error_highlight cannot get the code snippet evaluated by `Kernel#eval`, etc. This means that error_highlight cannot show highlight lines for...
This helps the us to understand the regex and make it easier for a future refactoring when we want to move some methods out of the base.rb file