summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuke Gruber <luke.gru@gmail.com>2024-09-17 08:34:29 -0400
committergit <svn-admin@ruby-lang.org>2024-09-24 13:28:01 +0000
commit2a0ee408afeeae0f1a0d354ac36c400a361f6767 (patch)
treeff5f3cac3a9f43ed2ff716df44426d6448ceffd3 /test
parent414a848cc6697067a988e056a787a0a7689c344b (diff)
[ruby/error_highlight] Fix error with prism when method given no arguments
such as: p = Proc.new This now matches the RubyVM::AbstractSyntaxTree behavior, which is not to highlight anything. https://github.com/ruby/error_highlight/commit/d5c592a1ba
Diffstat (limited to 'test')
-rw-r--r--test/error_highlight/test_error_highlight.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/error_highlight/test_error_highlight.rb b/test/error_highlight/test_error_highlight.rb
index 5f4c386990..63e7032eda 100644
--- a/test/error_highlight/test_error_highlight.rb
+++ b/test/error_highlight/test_error_highlight.rb
@@ -197,6 +197,15 @@ undefined method `foo' for #{ NIL_RECV_MESSAGE }
end
end
+ def test_CALL_arg_7
+ assert_error_message(ArgumentError, <<~END) do
+tried to create Proc object without a block (ArgumentError)
+ END
+
+ Proc.new
+ end
+ end
+
def test_QCALL_1
assert_error_message(NoMethodError, <<~END) do
undefined method `foo' for #{ ONE_RECV_MESSAGE }