mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add missing tests for p_args
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1a0990cb14
commit
bb77cc1837
1 changed files with 29 additions and 0 deletions
|
@ -546,6 +546,20 @@ END
|
|||
end
|
||||
end
|
||||
|
||||
assert_block do
|
||||
case [0]
|
||||
in [0,]
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
assert_block do
|
||||
case [0, 1]
|
||||
in [0,]
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
assert_block do
|
||||
case []
|
||||
in [0, *a]
|
||||
|
@ -626,6 +640,21 @@ END
|
|||
a == [1]
|
||||
end
|
||||
end
|
||||
|
||||
assert_block do
|
||||
case [0]
|
||||
in [0, *, 1]
|
||||
else
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
assert_block do
|
||||
case [0, 1]
|
||||
in [0, *, 1]
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_hash_pattern
|
||||
|
|
Loading…
Reference in a new issue