Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatch on Enumerator#size result between JRuby and MRI #2553

fmfdias opened this Issue Feb 2, 2015 · 0 comments


None yet
2 participants
Copy link

commented Feb 2, 2015

Hi all,
Bumped into this situation yesterday.
When calling size on the enumerator returned by calling each_slice with no block, JRuby and MRI return different values.

MRI 2.1.5, 2.2.0:

irb(main):001:0> [1,2,3,4].each_slice(2).size
=> 2


irb(main):001:0> [1,2,3,4].each_slice(2).size
=> nil

As a side note, rbx 2.5.2 also returns nil.

JRuby version:

jruby (2.2.0p0) 2015-01-20 d537cab Java HotSpot(TM) 64-Bit Server VM 25.25-b02 on 1.8.0_25-b17 +jit [darwin-x86_64]


14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.