diff options
author | Yusuke Endoh <[email protected]> | 2020-12-12 23:25:15 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2020-12-12 23:25:15 +0900 |
commit | 7ef5226520cbd13bdbc65a7f3c60188e002b133c (patch) | |
tree | ed2b73bcbb6e91efede93561885756c7043cbd6a /spec/ruby/language | |
parent | efbef729b2aee13241e6f7606f90d407f4530df8 (diff) |
spec: suppress deprecations of "lambda(&proc_block)" pattern
Diffstat (limited to 'spec/ruby/language')
-rw-r--r-- | spec/ruby/language/lambda_spec.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/spec/ruby/language/lambda_spec.rb b/spec/ruby/language/lambda_spec.rb index 1c9acba39c..630817c909 100644 --- a/spec/ruby/language/lambda_spec.rb +++ b/spec/ruby/language/lambda_spec.rb @@ -348,7 +348,9 @@ describe "A lambda expression 'lambda { ... }'" do end it "requires a block" do - lambda { lambda }.should raise_error(ArgumentError) + suppress_warning do + lambda { lambda }.should raise_error(ArgumentError) + end end it "may include a rescue clause" do @@ -375,9 +377,11 @@ describe "A lambda expression 'lambda { ... }'" do ruby_version_is "2.7" do it "raises ArgumentError" do implicit_lambda = nil - -> { - meth { 1 } - }.should raise_error(ArgumentError, /tried to create Proc object without a block/) + suppress_warning do + -> { + meth { 1 } + }.should raise_error(ArgumentError, /tried to create Proc object without a block/) + end end end end |