mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@9a501a8
This commit is contained in:
parent
d070523e7b
commit
a66bc2c011
41 changed files with 699 additions and 639 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue