jruby/jruby — pull request #1039 by dmarcotte (2013-09-24 16:18:17+00:00)
Title: 2.0 Enumerator#size compatibility enhancements

@headius, here's the first part of getting all our sizes in order.

This polishes the base support for 2.0 Enumerator#size, with the `Kernel#to_enum` and `Enumerator#initialize` implementations following the Ruby implementations closely ([`obj_to_enum`](https://github.com/ruby/ruby/blob/df3e4b830677e41530402e3e5727b71551fbe666/enumerator.c#L241), [`initialize`](https://github.com/ruby/ruby/blob/df3e4b830677e41530402e3e5727b71551fbe666/enumerator.c#L333)).

The `enumeratorizeWithSize` calls here don't cover all the cases we need, but should make it pretty clear how the others will follow. Another pull tackling the rest of #980 is on the way. (Sending this initial pull sooner than later to keep it from sprawling and get any feedback early.)

Let me know if you have any questions!