1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2019-05-28 22:41:48 +02:00
parent d070523e7b
commit a66bc2c011
41 changed files with 699 additions and 639 deletions

View file

@ -190,6 +190,17 @@ describe "Proc.new without a block" do
prc.call.should == "hello"
end
it "uses the implicit block from an enclosing method when called inside a block" do
def some_method
proc do |&block|
Proc.new
end.call { "failing" }
end
prc = some_method { "hello" }
prc.call.should == "hello"
end
end
ruby_version_is "2.7" do