diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/core/proc/lambda_spec.rb | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
download | ruby-5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0.tar.gz |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/proc/lambda_spec.rb')
-rw-r--r-- | spec/ruby/core/proc/lambda_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/proc/lambda_spec.rb b/spec/ruby/core/proc/lambda_spec.rb index edf2151f27..fe2ceb4279 100644 --- a/spec/ruby/core/proc/lambda_spec.rb +++ b/spec/ruby/core/proc/lambda_spec.rb @@ -3,7 +3,7 @@ require_relative 'fixtures/common' describe "Proc#lambda?" do it "returns true if the Proc was created from a block with the lambda keyword" do - lambda {}.lambda?.should be_true + -> {}.lambda?.should be_true end it "returns false if the Proc was created from a block with the proc keyword" do @@ -15,17 +15,17 @@ describe "Proc#lambda?" do end it "is preserved when passing a Proc with & to the lambda keyword" do - lambda(&lambda{}).lambda?.should be_true + lambda(&->{}).lambda?.should be_true lambda(&proc{}).lambda?.should be_false end it "is preserved when passing a Proc with & to the proc keyword" do - proc(&lambda{}).lambda?.should be_true + proc(&->{}).lambda?.should be_true proc(&proc{}).lambda?.should be_false end it "is preserved when passing a Proc with & to Proc.new" do - Proc.new(&lambda{}).lambda?.should be_true + Proc.new(&->{}).lambda?.should be_true Proc.new(&proc{}).lambda?.should be_false end @@ -34,7 +34,7 @@ describe "Proc#lambda?" do end it "is preserved when the Proc was passed using &" do - ProcSpecs.new_proc_from_amp(&lambda{}).lambda?.should be_true + ProcSpecs.new_proc_from_amp(&->{}).lambda?.should be_true ProcSpecs.new_proc_from_amp(&proc{}).lambda?.should be_false ProcSpecs.new_proc_from_amp(&Proc.new{}).lambda?.should be_false end @@ -47,13 +47,13 @@ describe "Proc#lambda?" do # [ruby-core:24127] it "is preserved when a Proc is curried" do - lambda{}.curry.lambda?.should be_true + ->{}.curry.lambda?.should be_true proc{}.curry.lambda?.should be_false Proc.new{}.curry.lambda?.should be_false end it "is preserved when a curried Proc is called without enough arguments" do - lambda{|x,y|}.curry.call(42).lambda?.should be_true + -> x, y{}.curry.call(42).lambda?.should be_true proc{|x,y|}.curry.call(42).lambda?.should be_false Proc.new{|x,y|}.curry.call(42).lambda?.should be_false end |