Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/rubyPublic

Add clarifications about the Enumerator.size#15615

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
zverok wants to merge1 commit intoruby:master
base:master
Choose a base branch
Loading
fromzverok:adjust-enumerator-size-docs

Conversation

@zverok
Copy link
Contributor

As discussed inBug #21780, added clarifications about the imprecision ofEnumerator.size, and one small example of usingsize: nil inEnumerator.produce.

@zverokzverok requested a review fromknuDecember 17, 2025 19:55
@zverokzverok self-assigned thisDec 17, 2025
@zverokzverok added the DocumentationImprovements to documentation. labelDec 17, 2025
Copy link
Contributor

@jeremyevansjeremyevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think it's worth adding these clarifications, but I would reword and not beat the reader over the head with comments on the results ofsize.

zverok reacted with heart emoji
@zverokzverokforce-pushed theadjust-enumerator-size-docs branch fromc5e3eea to414391eCompareDecember 18, 2025 18:08
@zverok
Copy link
ContributorAuthor

Thanks a lot@jeremyevans, I always struggle to maintain a balance and not over-explain stuff. Your versions are definitely much better!

Copy link
Contributor

@jeremyevansjeremyevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks good. I recommend a couple more changes, but this can be merged without further review.

Comment on lines +1234 to +1235
* Note that enumerator size might be imprecise, and should be rather treated as a hint.
* There is no check that the size provided to ::new is accurate:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
*Notethatenumeratorsizemightbeimprecise,andshouldberathertreatedasahint.
*Thereisnocheckthatthesizeprovidedto ::newisaccurate:
*Notethatenumeratorsizemightbeinaccurate,andshouldberathertreatedasahint.
*Forexample,thereisnocheckthatthesizeprovidedto ::newisaccurate:

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@jeremyevansjeremyevansjeremyevans approved these changes

@knuknuAwaiting requested review from knu

Assignees

@zverokzverok

Labels

DocumentationImprovements to documentation.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@zverok@jeremyevans

[8]ページ先頭

©2009-2025 Movatter.jp