From 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sat, 27 Jul 2019 12:40:09 +0200 Subject: Update to ruby/spec@875a09e --- spec/ruby/core/proc/new_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'spec/ruby/core/proc/new_spec.rb') diff --git a/spec/ruby/core/proc/new_spec.rb b/spec/ruby/core/proc/new_spec.rb index 60a7320e4b..cc033467e5 100644 --- a/spec/ruby/core/proc/new_spec.rb +++ b/spec/ruby/core/proc/new_spec.rb @@ -71,7 +71,7 @@ describe "Proc.new with an associated block" do end res = some_method() - lambda { res.call }.should raise_error(LocalJumpError) + -> { res.call }.should raise_error(LocalJumpError) end it "returns from within enclosing method when 'return' is used in the block" do @@ -169,15 +169,15 @@ end describe "Proc.new without a block" do it "raises an ArgumentError" do - lambda { Proc.new }.should raise_error(ArgumentError) + -> { Proc.new }.should raise_error(ArgumentError) end it "raises an ArgumentError if invoked from within a method with no block" do - lambda { ProcSpecs.new_proc_in_method }.should raise_error(ArgumentError) + -> { ProcSpecs.new_proc_in_method }.should raise_error(ArgumentError) end it "raises an ArgumentError if invoked on a subclass from within a method with no block" do - lambda { ProcSpecs.new_proc_subclass_in_method }.should raise_error(ArgumentError) + -> { ProcSpecs.new_proc_subclass_in_method }.should raise_error(ArgumentError) end ruby_version_is ""..."2.7" do @@ -205,11 +205,11 @@ describe "Proc.new without a block" do ruby_version_is "2.7" do it "can be created if invoked from within a method with a block" do - lambda { ProcSpecs.new_proc_in_method { "hello" } }.should complain(/Capturing the given block using Proc.new is deprecated/) + -> { ProcSpecs.new_proc_in_method { "hello" } }.should complain(/Capturing the given block using Proc.new is deprecated/) end it "can be created if invoked on a subclass from within a method with a block" do - lambda { ProcSpecs.new_proc_subclass_in_method { "hello" } }.should complain(/Capturing the given block using Proc.new is deprecated/) + -> { ProcSpecs.new_proc_subclass_in_method { "hello" } }.should complain(/Capturing the given block using Proc.new is deprecated/) end -- cgit v1.2.3