summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-09-12 12:32:17 -0400
committergit <[email protected]>2024-09-13 13:17:56 +0000
commitf0dcbbe9b9de45669dad67bd99d4539ccd4bbc83 (patch)
treea1c7524d7eefe0d0f145021ea60f1f91bf302486
parent8e2d971b9ac7b6f0642b0ab83e4a363f8a0c7183 (diff)
[ruby/prism] Reverse-sync numbered reference range handling
https://github.com/ruby/prism/commit/a2f57ef6e3
-rw-r--r--test/prism/result/warnings_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/prism/result/warnings_test.rb b/test/prism/result/warnings_test.rb
index 861f6d9999..b3817b631f 100644
--- a/test/prism/result/warnings_test.rb
+++ b/test/prism/result/warnings_test.rb
@@ -174,6 +174,10 @@ module Prism
assert_warning("if true\nelsif\nfalse; end", "end of line")
end
+ def test_numbered_reference
+ assert_warning("_ = _ = $999999999999999999999", "too big for a number variable, always nil")
+ end
+
def test_shareable_constant_value
assert_warning("foo # shareable_constant_value: none", "ignored")
assert_warning("\v # shareable_constant_value: none", "ignored")