Discussed fix. We previously talked about opening up SyntaxError to be monkeypatched in the same way that other gems hook into NoMethodError. This is currently not possible and requires development work. When we last talked about it at RubyKaigi Nobu expressed an ability to make such a change.
Setup SyntaxSuggest as default gem
Adds the
syntax_suggest
syntax error display tool to Ruby through the same mechanism aserror_highlight
anddid_you_mean
. Reference ticket: https://bugs.ruby-lang.org/issues/18159close #4845
What is syntax_suggest?¶
When a syntax error is raised by requiring a file, dead_end will use a combination of indentation and lexing to identify the problem.
Known issues¶
require
,load
,autoload
, andrequire_relative
(since it monkeypatches them to detect syntax errors). It does not work with direct Ruby file invocations https://github.com/zombocom/dead_end/issues/31.SyntaxError
to be monkeypatched in the same way that other gems hook intoNoMethodError
. This is currently not possible and requires development work. When we last talked about it at RubyKaigi Nobu expressed an ability to make such a change.