зеркало из https://github.com/github/ruby.git
Drop whole examples
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8197abf9aa
Коммит
0a5655a5be
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче