File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -700,6 +700,9 @@ def prism_spot_call_for_name
700700 # foo 42
701701 # ^^
702702 def prism_spot_call_for_args
703+ # Disallow highlighting arguments if there are no arguments.
704+ return if @node . arguments . nil?
705+
703706 # Explicitly turn off foo.() syntax because error_highlight expects this
704707 # to not work.
705708 return nil if @node . name == :call && @node . message_loc . nil?
Original file line number Diff line number Diff line change @@ -197,6 +197,15 @@ def test_CALL_arg_6
197197 end
198198 end
199199
200+ def test_CALL_arg_7
201+ assert_error_message ( ArgumentError , <<~END ) do
202+ tried to create Proc object without a block (ArgumentError)
203+ END
204+
205+ Proc . new
206+ end
207+ end
208+
200209 def test_QCALL_1
201210 assert_error_message ( NoMethodError , <<~END ) do
202211undefined method `foo' for #{ ONE_RECV_MESSAGE }
You can’t perform that action at this time.
0 commit comments