summaryrefslogtreecommitdiff
path: root/spec/ruby/core/proc/shared/equal.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-07-27 12:40:09 +0200
committerBenoit Daloze <eregontp@gmail.com>2019-07-27 12:40:09 +0200
commit5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch)
tree05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/core/proc/shared/equal.rb
parenta06301b103371b0b7da8eaca26ba744961769f99 (diff)
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/proc/shared/equal.rb')
-rw-r--r--spec/ruby/core/proc/shared/equal.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/ruby/core/proc/shared/equal.rb b/spec/ruby/core/proc/shared/equal.rb
index a5d067cea3..46a1894424 100644
--- a/spec/ruby/core/proc/shared/equal.rb
+++ b/spec/ruby/core/proc/shared/equal.rb
@@ -13,7 +13,7 @@ describe :proc_equal, shared: true do
p = Proc.new { :foo }
p.send(@method, p).should be_true
- p = lambda { :foo }
+ p = -> { :foo }
p.send(@method, p).should be_true
end
@@ -24,7 +24,7 @@ describe :proc_equal, shared: true do
p = Proc.new { :foo }
p.send(@method, p.dup).should be_true
- p = lambda { :foo }
+ p = -> { :foo }
p.send(@method, p.dup).should be_true
end
@@ -43,18 +43,18 @@ describe :proc_equal, shared: true do
end
it "returns true if both lambdas with the same body and environment" do
- x = lambda { :foo }
- x2 = lambda { :foo }
+ x = -> { :foo }
+ x2 = -> { :foo }
x.send(@method, x2).should be_true
end
it "returns true if both different kinds of procs with the same body and env" do
- p = lambda { :foo }
+ p = -> { :foo }
p2 = proc { :foo }
p.send(@method, p2).should be_true
x = proc { :bar }
- x2 = lambda { :bar }
+ x2 = -> { :bar }
x.send(@method, x2).should be_true
end
@@ -65,7 +65,7 @@ describe :proc_equal, shared: true do
p = Proc.new { :foo }
p.send(@method, Object.new).should be_false
- p = lambda { :foo }
+ p = -> { :foo }
p.send(@method, :foo).should be_false
end
@@ -76,8 +76,8 @@ describe :proc_equal, shared: true do
end
it "returns false if self and other are both lambdas but have different bodies" do
- p = lambda { :foo }
- p2 = lambda { :bar }
+ p = -> { :foo }
+ p2 = -> { :bar }
p.send(@method, p2).should be_false
end
end
@@ -94,7 +94,7 @@ describe :proc_equal_undefined, shared: true do
p = Proc.new { :foo }
p.send(@method, p.dup).should be_false
- p = lambda { :foo }
+ p = -> { :foo }
p.send(@method, p.dup).should be_false
end
end