diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-13 00:56:12 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-13 00:56:12 +0000 |
commit | d3da5fbd30e174c5737ec09c6896db7e81691714 (patch) | |
tree | 4637664b9aa913d7bd0bc43b9ec5f9166f2ef2c1 /spec/ruby/core | |
parent | 95a82766306641595179e23dbac3d6992b919460 (diff) | |
download | ruby-d3da5fbd30e174c5737ec09c6896db7e81691714.tar.gz |
Proc.new: change deprecation warning for clarity (issue #15539)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core')
-rw-r--r-- | spec/ruby/core/kernel/proc_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/proc/new_spec.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/kernel/proc_spec.rb b/spec/ruby/core/kernel/proc_spec.rb index 2c0e7988f9..8c56946874 100644 --- a/spec/ruby/core/kernel/proc_spec.rb +++ b/spec/ruby/core/kernel/proc_spec.rb @@ -56,7 +56,7 @@ describe "Kernel#proc" 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 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 |