diff options
Diffstat (limited to 'spec/ruby/core/proc')
-rw-r--r-- | spec/ruby/core/proc/new_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/proc/new_spec.rb b/spec/ruby/core/proc/new_spec.rb index 1c37c64478..7579bfe1b6 100644 --- a/spec/ruby/core/proc/new_spec.rb +++ b/spec/ruby/core/proc/new_spec.rb @@ -194,11 +194,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(/tried to create Proc object without a block/) + lambda { 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(/tried to create Proc object without a block/) + lambda { ProcSpecs.new_proc_subclass_in_method { "hello" } }.should complain(/Capturing the given block using Proc.new is deprecated/) end @@ -209,7 +209,7 @@ describe "Proc.new without a block" do -> { some_method { "hello" } - }.should complain(/tried to create Proc object without a block/) + }.should complain(/Capturing the given block using Proc.new is deprecated/) end end end |