summaryrefslogtreecommitdiff
path: root/spec/ruby/core/proc
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2020-06-10 15:17:54 -0700
committerJeremy Evans <code@jeremyevans.net>2020-06-10 17:49:54 -0700
commitf3e927b0cc1fcbf03abea7f66b1a3736a270a8de (patch)
treedbe7b9d1db555e85171d7cb1eb72a0ca9c3509a9 /spec/ruby/core/proc
parentf48fce4981574f7df33982eb901c94e8f4d6d4ab (diff)
Make proc/Proc.new without block an error instead of warning
The warning for these was added in 2.7.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3208
Diffstat (limited to 'spec/ruby/core/proc')
-rw-r--r--spec/ruby/core/proc/new_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ruby/core/proc/new_spec.rb b/spec/ruby/core/proc/new_spec.rb
index cc033467e5..faaf85fea5 100644
--- a/spec/ruby/core/proc/new_spec.rb
+++ b/spec/ruby/core/proc/new_spec.rb
@@ -203,7 +203,7 @@ describe "Proc.new without a block" do
end
end
- ruby_version_is "2.7" do
+ ruby_version_is "2.7" ... "2.8" do
it "can be created if invoked from within a method with a block" do
-> { ProcSpecs.new_proc_in_method { "hello" } }.should complain(/Capturing the given block using Proc.new is deprecated/)
end