diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/core/kernel/fixtures/classes.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/kernel/lambda_spec.rb | 4 | ||||
-rw-r--r-- | spec/ruby/core/proc/fixtures/source_location.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/proc/lambda_spec.rb | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/kernel/fixtures/classes.rb b/spec/ruby/core/kernel/fixtures/classes.rb index 623b45ca34..8702c925c8 100644 --- a/spec/ruby/core/kernel/fixtures/classes.rb +++ b/spec/ruby/core/kernel/fixtures/classes.rb @@ -350,7 +350,7 @@ module KernelSpecs module Ampersand def lambda(&block) - super(&block) + suppress_warning {super(&block)} end end diff --git a/spec/ruby/core/kernel/lambda_spec.rb b/spec/ruby/core/kernel/lambda_spec.rb index 5c30511270..dfe36cefaa 100644 --- a/spec/ruby/core/kernel/lambda_spec.rb +++ b/spec/ruby/core/kernel/lambda_spec.rb @@ -33,7 +33,7 @@ describe "Kernel.lambda" do it "returns the passed Proc if given an existing Proc" do some_proc = proc {} - l = lambda(&some_proc) + l = suppress_warning {lambda(&some_proc)} l.should equal(some_proc) l.lambda?.should be_false end @@ -55,7 +55,7 @@ describe "Kernel.lambda" do it "does not create lambda-style Procs when captured with #method" do kernel_lambda = method(:lambda) - l = kernel_lambda.call { 42 } + l = suppress_warning {kernel_lambda.call { 42 }} l.lambda?.should be_false l.call(:extra).should == 42 end 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 |