Enumerator#rewind goes to beginning instead of decrementing one step.
From the ruby docs:
rewind → e
Rewinds the enumeration sequence by one step.
In practice, however, it fully rewinds (either change documentation or have it do what it says. Going back one step is nice though):
irb(main):001:0> a = [1,2,3,4]
=> [1, 2, 3, 4]
irb(main):002:0> b = a.to_enum
#2 Updated by Yukihiro Matsumoto over 4 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100