Commit b4647224 authored by Daniel Bovensiepen's avatar Daniel Bovensiepen

Add test case for Integer#step

parent ef17231b
...@@ -172,3 +172,19 @@ assert('Integer#upto', '15.2.8.3.27') do ...@@ -172,3 +172,19 @@ assert('Integer#upto', '15.2.8.3.27') do
end end
a == 6 a == 6
end 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment