summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_ast.rb2
-rw-r--r--test/ruby/test_syntax.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb
index 0932e93d5a..7af6e43e1d 100644
--- a/test/ruby/test_ast.rb
+++ b/test/ruby/test_ast.rb
@@ -469,7 +469,7 @@ class TestAst < Test::Unit::TestCase
end
assert_equal(nil, kwrest.call(''))
- assert_equal([nil], kwrest.call('**'))
+ assert_equal([:**], kwrest.call('**'))
assert_equal(false, kwrest.call('**nil'))
assert_equal([:a], kwrest.call('**a'))
end
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index b0ad012131..7a5f4c9528 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -163,9 +163,11 @@ class TestSyntax < Test::Unit::TestCase
def c(**kw); kw end
def d(**); b(k: 1, **) end
def e(**); b(**, k: 1) end
+ def f(a: nil, **); b(**) end
assert_equal({a: 1, k: 3}, b(a: 1, k: 3))
assert_equal({a: 1, k: 3}, d(a: 1, k: 3))
assert_equal({a: 1, k: 1}, e(a: 1, k: 3))
+ assert_equal({k: 3}, f(a: 1, k: 3))
end;
end