ruby / error_highlight

The gem enhances Exception#message by adding a short explanation where the exception is raised
MIT License
150 stars 23 forks source link

Does not work in IRB #6

Open mame opened 3 years ago

mame commented 3 years ago

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 IRB.

This is a very tough issue. We need to design how to keep the eval'ed source code.

Slightly related to: https://bugs.ruby-lang.org/issues/16983