git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ktsj 2019-04-21 02:43:31 +00:00
Родитель 1a0990cb14
Коммит bb77cc1837
1 изменённых файлов: 29 добавлений и 0 удалений

Просмотреть файл

@ -546,6 +546,20 @@ END
end 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 assert_block do
case [] case []
in [0, *a] in [0, *a]
@ -626,6 +640,21 @@ END
a == [1] a == [1]
end end
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 end
def test_hash_pattern def test_hash_pattern