git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2019-01-11 09:36:49 +00:00
Родитель 8197abf9aa
Коммит 0a5655a5be
1 изменённых файлов: 2 добавлений и 5 удалений

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

@ -20,18 +20,15 @@ describe "Proc as a block pass argument" do
end
end
ruby_version_is ""..."2.8" do
ruby_version_is ""..."2.7" do
describe "Proc as an implicit block pass argument" do
def revivify
Proc.new
end
it "remains the same object if re-vivified by the target method" do
warning = ruby_version_is("2.7") {/tried to create Proc object without a block/}
p = Proc.new {}
p2 = nil
-> {p2 = revivify(&p)}.should complain(warning)
p2 = revivify(&p)
p.should equal p2
p.should == p2
end