1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2019-07-27 12:40:09 +02:00
parent a06301b103
commit 5c276e1cc9
1247 changed files with 5316 additions and 5028 deletions

View file

@ -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