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

Always compute Enumerable#count through enumeration for 1.9+ #979

Merged
merged 1 commit into from Aug 31, 2013

Conversation

@dmarcotte
Copy link
Contributor

@dmarcotte dmarcotte commented Aug 30, 2013

Looks like MRI dropped the #size optimization in #count in 1.9.2. Comparing the 1.8 doc to the 2.0 doc also shows this is the intended behavior (interestingly, the 1.9 doc seems to be out of date)

Update to match that behavior (also fixes #922).

Starting in 1.9, #count is always computed through enumeration
headius added a commit that referenced this pull request Aug 31, 2013
Always compute Enumerable#count through enumeration for 1.9+
@headius headius merged commit a4f8fca into jruby:master Aug 31, 2013
1 check passed
1 check passed
@veganstraightedge
default The Travis CI build passed
Details
@headius
Copy link
Member

@headius headius commented Aug 31, 2013

Thanks! Do you think you'll be able to look into enumerator_with_size logic too?

@dmarcotte
Copy link
Contributor Author

@dmarcotte dmarcotte commented Sep 1, 2013

Absolutely. Might be a couple of weeks before I can send it, but it's definitely coming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants