summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/error_highlight/base.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/error_highlight/base.rb b/lib/error_highlight/base.rb
index 4669727c65..e2077fa5a6 100644
--- a/lib/error_highlight/base.rb
+++ b/lib/error_highlight/base.rb
@@ -700,6 +700,9 @@ module ErrorHighlight
# foo 42
# ^^
def prism_spot_call_for_args
+ # Disallow highlighting arguments if there are no arguments.
+ return if @node.arguments.nil?
+
# Explicitly turn off foo.() syntax because error_highlight expects this
# to not work.
return nil if @node.name == :call && @node.message_loc.nil?