7 Commits

Author SHA1 Message Date
KOBAYASHI Shuji 66211394e1 Enumerator::Chain#rewind shouldn't rewind elements aren't iterated
### 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
  ```
2019-09-02 08:58:33 +09:00
Yukihiro "Matz" Matsumoto 3ac98009d3 Merge pull request #4602 from shuujii/remove-EnumeratorChain-initialize_copy
Remove `Enumerator::Chain#initialize_copy`
2019-07-28 23:44:11 +09:00
KOBAYASHI Shuji 7f80a5f73c Define #+ to Enumerator and Enumerator#Chain instead of Enumerable 2019-07-28 22:52:24 +09:00
KOBAYASHI Shuji 27e3d92a30 Remove Enumerator::Chain#initialize_copy
I think `Enumerator::Chain#initialize_copy` is unnecessary because CRuby
doesn't clone elements.
2019-07-28 22:12:02 +09:00
KOBAYASHI Shuji fe9a58c193 Drop dependency from mruby-enum-chain to mruby-enum-ext 2019-07-27 20:45:14 +09:00
dearblue f392337e10 Add test for Enumerator::Chain 2019-01-03 18:16:26 +09:00
dearblue a98359faa7 Add enumerator chain feature (CRuby-2.6 compatible)
- Enumerator::Chain
  - Enumerable#chain
  - Enumerable#+
2019-01-03 18:16:26 +09:00