Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add test case for Integer#step

  • Loading branch information...
commit b4647224b765380e5f40d0af7927355709bce346 1 parent ef17231
@bovi bovi authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.