aboutsummaryrefslogtreecommitdiffstats
path: root/spec
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
parentf48fce4981574f7df33982eb901c94e8f4d6d4ab (diff)
downloadruby-f3e927b0cc1fcbf03abea7f66b1a3736a270a8de.tar.gz
Make proc/Proc.new without block an error instead of warning
The warning for these was added in 2.7.
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/core/kernel/proc_spec.rb2
-rw-r--r--spec/ruby/core/proc/new_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/kernel/proc_spec.rb b/spec/ruby/core/kernel/proc_spec.rb
index 2a79548313..3930715ebd 100644
--- a/spec/ruby/core/kernel/proc_spec.rb
+++ b/spec/ruby/core/kernel/proc_spec.rb
@@ -48,7 +48,7 @@ describe "Kernel#proc" do
end
end
- ruby_version_is "2.7" do
+ ruby_version_is "2.7" ... "2.8" do
it "can be created when called with no block" do
def some_method
proc
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