jruby/jruby — pull request #1310 by dmarcotte (2013-12-06 15:46:37+00:00)
Title: Ensure Enumerator#size reflects changes to its underlying object

Realized I was missing this important aspect in my implementations for #980: internally created enumerators need to lazily evaluate their size so that they stay consistent with the underlying object. For example:

```ruby
a = [1,2]
e = a.each
p e.size # should be 2
a << 3
p e.size # should be 3
```

I'm planning to put a RubySpec in to cover this, but in the meantime I used this [quick and dirty script](https://gist.github.com/dmarcotte/7826748) to exercise the new code. (Side note: MRI fails one case in that script. [Issue here](https://bugs.ruby-lang.org/issues/9223))