diff options
| author | Benoit Daloze <eregontp@gmail.com> | 2023-06-26 15:55:11 +0200 |
|---|---|---|
| committer | Benoit Daloze <eregontp@gmail.com> | 2023-06-26 15:55:11 +0200 |
| commit | 515bd4214497b3af02f6eef51b496ad9a0cf6b3b (patch) | |
| tree | 4554360d275a3bb9dc696f952b8f3d1bcd88f18a /spec/ruby/core/kernel/lambda_spec.rb | |
| parent | f73fa299279ac322bd921691d1ba0e8bf2b39b5f (diff) | |
Update to ruby/spec@30e1c35
Diffstat (limited to 'spec/ruby/core/kernel/lambda_spec.rb')
| -rw-r--r-- | spec/ruby/core/kernel/lambda_spec.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/spec/ruby/core/kernel/lambda_spec.rb b/spec/ruby/core/kernel/lambda_spec.rb index 2aa4d4f2fb..2f7abc749c 100644 --- a/spec/ruby/core/kernel/lambda_spec.rb +++ b/spec/ruby/core/kernel/lambda_spec.rb @@ -136,15 +136,13 @@ describe "Kernel.lambda" do klass.new.ret.should == 1 end - ruby_version_is "3.0" do - context "when called without a literal block" do - it "warns when proc isn't a lambda" do - -> { lambda(&proc{}) }.should complain("#{__FILE__}:#{__LINE__}: warning: lambda without a literal block is deprecated; use the proc without lambda instead\n") - end + context "when called without a literal block" do + it "warns when proc isn't a lambda" do + -> { lambda(&proc{}) }.should complain("#{__FILE__}:#{__LINE__}: warning: lambda without a literal block is deprecated; use the proc without lambda instead\n") + end - it "doesn't warn when proc is lambda" do - -> { lambda(&lambda{}) }.should_not complain(verbose: true) - end + it "doesn't warn when proc is lambda" do + -> { lambda(&lambda{}) }.should_not complain(verbose: true) end end end |
