Skip to content

Commit 58aa74a

Browse files
committed
Only compare &nil syntax on rubies that support it
1 parent 4dce80f commit 58aa74a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/prism/ruby/parameters_signature_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def test_nokey
5151
end
5252

5353
def test_noblock
54-
assert_parameters([[:noblock]], "&nil")
54+
assert_parameters([[:noblock]], "&nil", compare: RUBY_VERSION >= "4.1")
5555
end
5656

5757
def test_keyrest_anonymous
@@ -78,7 +78,7 @@ def test_forwarding
7878

7979
private
8080

81-
def assert_parameters(expected, source)
81+
def assert_parameters(expected, source, compare: true)
8282
# Compare against our expectation.
8383
assert_equal(expected, signature(source))
8484

0 commit comments

Comments
 (0)