summaryrefslogtreecommitdiff
path: root/spec/ruby/core/proc
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/proc')
-rw-r--r--spec/ruby/core/proc/fixtures/source_location.rb2
-rw-r--r--spec/ruby/core/proc/lambda_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/proc/fixtures/source_location.rb b/spec/ruby/core/proc/fixtures/source_location.rb
index 688dac1e22..5572094630 100644
--- a/spec/ruby/core/proc/fixtures/source_location.rb
+++ b/spec/ruby/core/proc/fixtures/source_location.rb
@@ -44,7 +44,7 @@ module ProcSpecs
def self.my_detached_lambda
body = -> { true }
- lambda(&body)
+ suppress_warning {lambda(&body)}
end
def self.my_detached_proc_new
diff --git a/spec/ruby/core/proc/lambda_spec.rb b/spec/ruby/core/proc/lambda_spec.rb
index fe2ceb4279..b2d3f50350 100644
--- a/spec/ruby/core/proc/lambda_spec.rb
+++ b/spec/ruby/core/proc/lambda_spec.rb
@@ -15,8 +15,8 @@ describe "Proc#lambda?" do
end
it "is preserved when passing a Proc with & to the lambda keyword" do
- lambda(&->{}).lambda?.should be_true
- lambda(&proc{}).lambda?.should be_false
+ suppress_warning {lambda(&->{})}.lambda?.should be_true
+ suppress_warning {lambda(&proc{})}.lambda?.should be_false
end
it "is preserved when passing a Proc with & to the proc keyword" do