added parentheses to to_enum call where the return value is used,
explicitly specifying :each for readability.
Co-authored-by: Claude <noreply@anthropic.com>
Added complete call-seq documentation for all enumerator chain methods in
mrblib/chain.rb (8 methods):
## Enumerable Extension Methods:
- chain: creates Enumerator::Chain from multiple enumerables for sequential
iteration, enabling fluent chaining of enumerable objects
## Enumerator Extension Methods:
- +: operator overload for creating chains from two enumerators, provides
convenient syntax for combining enumerators
## Enumerator::Chain Class Methods:
- new: constructor for creating chain from multiple enumerable arguments,
stores enumerables and initializes position tracking
## Enumerator::Chain Instance Methods:
- each: core iteration method that sequentially processes all chained
enumerables, supports both block and enumerator return modes
- size: calculates total size across all chained enumerables, returns nil
if any enumerable doesn't support size method
- rewind: resets iteration state by rewinding all previously iterated
enumerables in reverse order, maintains proper state management
- +: creates new chain by appending additional enumerable to existing chain,
enables further composition of enumerator chains
- inspect: provides debugging representation showing internal enumerable
structure for development and troubleshooting
Co-authored-by: Atlassian Rovo Dev
### Example:
```ruby
# example.rb
e = [1]
def e.rewind; p :r end
c = e.chain(e)
c.each{break c}.rewind
```
#### Before this patch:
```terminal
$ bin/mruby example.rb
:r
:r
```
#### After this patch (same as Ruby):
```terminal
$ bin/mruby example.rb
:r
```