Skip to content
Browse files

Merge pull request #473 from bovi/integer-step-test

Add test case for Integer#step
  • Loading branch information...
2 parents 8bed663 + b464722 commit 4bf51cdd420aee2b40ef0a48fa798da0c82db726 @matz matz committed Sep 15, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 test/t/integer.rb
View
16 test/t/integer.rb
@@ -172,3 +172,19 @@
end
a == 6
end
+
+# Not ISO specified
+
+assert('Integer#step') do
+ a = []
+ b = []
+ 1.step(3) do |i|
+ a << i
+ end
+ 1.step(6, 2) do |i|
+ b << i
+ end
+
+ a == [1, 2, 3] and
+ b == [1, 3, 5]
+end

0 comments on commit 4bf51cd

Please sign in to comment.
Something went wrong with that request. Please try again.