summaryrefslogtreecommitdiff
path: root/spec/ruby/core/range/each_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/range/each_spec.rb')
-rw-r--r--spec/ruby/core/range/each_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/range/each_spec.rb b/spec/ruby/core/range/each_spec.rb
index c5253dafd9..110b0602d0 100644
--- a/spec/ruby/core/range/each_spec.rb
+++ b/spec/ruby/core/range/each_spec.rb
@@ -33,12 +33,12 @@ describe "Range#each" do
end
it "raises a TypeError if the first element does not respond to #succ" do
- lambda { (0.5..2.4).each { |i| i } }.should raise_error(TypeError)
+ -> { (0.5..2.4).each { |i| i } }.should raise_error(TypeError)
b = mock('x')
(a = mock('1')).should_receive(:<=>).with(b).and_return(1)
- lambda { (a..b).each { |i| i } }.should raise_error(TypeError)
+ -> { (a..b).each { |i| i } }.should raise_error(TypeError)
end
it "returns self" do
@@ -54,7 +54,7 @@ describe "Range#each" do
it "raises a TypeError if the first element is a Time object" do
t = Time.now
- lambda { (t..t+1).each { |i| i } }.should raise_error(TypeError)
+ -> { (t..t+1).each { |i| i } }.should raise_error(TypeError)
end
it "passes each Symbol element by using #succ" do