mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
8197abf9aa
commit
0a5655a5be
1 changed files with 2 additions and 5 deletions
|
@ -20,18 +20,15 @@ describe "Proc as a block pass argument" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ruby_version_is ""..."2.8" do
|
ruby_version_is ""..."2.7" do
|
||||||
describe "Proc as an implicit block pass argument" do
|
describe "Proc as an implicit block pass argument" do
|
||||||
def revivify
|
def revivify
|
||||||
Proc.new
|
Proc.new
|
||||||
end
|
end
|
||||||
|
|
||||||
it "remains the same object if re-vivified by the target method" do
|
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 {}
|
p = Proc.new {}
|
||||||
p2 = nil
|
p2 = revivify(&p)
|
||||||
-> {p2 = revivify(&p)}.should complain(warning)
|
|
||||||
p.should equal p2
|
p.should equal p2
|
||||||
p.should == p2
|
p.should == p2
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue