Skip to content

Commit b5c2c20

Browse files
eregonlxxxvi
authored andcommitted
Add example with step 1
1 parent 9d58f70 commit b5c2c20

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/array/shared/slice.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ def to.to_int() -2 end
536536
ruby_version_is "3.0" do
537537
it "can be sliced with Enumerator::ArithmeticSequence" do
538538
a = [0, 1, 2, 3, 4, 5]
539+
a.send(@method, eval("(0..).step(1)")).should == [0, 1, 2, 3, 4, 5]
539540
a.send(@method, eval("(0..).step(2)")).should == [0, 2, 4]
540541
a.send(@method, eval("(0..).step(3)")).should == [0, 3]
541542
a.send(@method, eval("(0..).step(10)")).should == [0]

0 commit comments

Comments
 (0)