aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/language/lambda_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/language/lambda_spec.rb')
-rw-r--r--spec/ruby/language/lambda_spec.rb16
1 files changed, 0 insertions, 16 deletions
diff --git a/spec/ruby/language/lambda_spec.rb b/spec/ruby/language/lambda_spec.rb
index 3b06a0d595..5fa7fa6bfa 100644
--- a/spec/ruby/language/lambda_spec.rb
+++ b/spec/ruby/language/lambda_spec.rb
@@ -186,14 +186,6 @@ describe "A lambda literal -> () { }" do
@a.().should == {}
@a.(1, 2, 3, a: 4, b: 5).should == {a: 4, b: 5}
- def self.suppress_keyword_warning(&block)
- if RUBY_VERSION > '2.7'
- suppress_warning(&block)
- else
- yield
- end
- end
-
suppress_keyword_warning do
h = mock("keyword splat")
h.should_receive(:to_hash).and_return({a: 1})
@@ -530,14 +522,6 @@ describe "A lambda expression 'lambda { ... }'" do
@a.().should == {}
@a.(1, 2, 3, a: 4, b: 5).should == {a: 4, b: 5}
- def self.suppress_keyword_warning(&block)
- if RUBY_VERSION > '2.7'
- suppress_warning(&block)
- else
- yield
- end
- end
-
suppress_keyword_warning do
h = mock("keyword splat")
h.should_receive(:to_hash).and_return({a: 1})