From 1bf46d65b2031f12d2cbe4b8d238ba0544edffe5 Mon Sep 17 00:00:00 2001 From: schneems Date: Wed, 3 Nov 2021 08:34:45 -0500 Subject: [PATCH] Remove string embed suggestion I don't believe you can make a syntax error by missing a `#{` in a string, if you do then you end up with no string embed: ``` "foo}" # => No syntax error "#foo}" # => No syntax error "{foo}" # => No syntax error ``` Removing this suggestion makes the error more clear. The default message will still be used which is essentially the same message minus the `#{` part. --- lib/dead_end/explain_syntax.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/dead_end/explain_syntax.rb b/lib/dead_end/explain_syntax.rb index 7996f84..5b12425 100644 --- a/lib/dead_end/explain_syntax.rb +++ b/lib/dead_end/explain_syntax.rb @@ -80,8 +80,6 @@ def why(miss) "Unmatched `end', missing keyword (`do', `def`, `if`, etc.) ?" when "end" "Unmatched keyword, missing `end' ?" - when "{" - "Unmatched `}', missing `{' or `\#{' ?" else inverse = INVERSE.fetch(miss) { raise "Unknown explain syntax char or key: #{miss.inspect}"