Skip to content

Add Enumerable#lazy guideline to "Collections" section#938

Open
ydakuka wants to merge 1 commit intorubocop:masterfrom
ydakuka:add-enumerable-lazy
Open

Add Enumerable#lazy guideline to "Collections" section#938
ydakuka wants to merge 1 commit intorubocop:masterfrom
ydakuka:add-enumerable-lazy

Conversation

@ydakuka
Copy link
Copy Markdown
Contributor

@ydakuka ydakuka commented Dec 15, 2023

No description provided.

@ydakuka ydakuka force-pushed the add-enumerable-lazy branch 3 times, most recently from 806054e to cd1789d Compare December 15, 2023 14:18
README.adoc Outdated
"when an unknown printer took a galley of type and scrambled it to make a type specimen book."
----

== Enumerable
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Might be good to check if something else can't be moved under this section as well, as it's kind of weird to have a section with a single entry in it.

README.adoc Outdated

== Enumerable

=== lazy [[lazy]]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd use a more descriptive heading here - something like Leverage lazy to optimize memory usage or whatever.

README.adoc Outdated
SIZE = 10
MAX = 10_000_000

# bad
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You might also want to mention that this will instantiate a huge collection first, so it's clearer what the problem and value proposition is.

@ydakuka ydakuka force-pushed the add-enumerable-lazy branch 3 times, most recently from 214df9c to bcc9ef6 Compare December 18, 2023 08:36
@ydakuka ydakuka force-pushed the add-enumerable-lazy branch from bcc9ef6 to 95ffb09 Compare February 15, 2026 11:15
@ydakuka
Copy link
Copy Markdown
Contributor Author

ydakuka commented Feb 15, 2026

Done. Removed the standalone "Enumerable" section and moved the lazy tip into the "Collections" section — right after collection querying and before "Numbers". It now sits alongside other Enumerable-related tips (flat_map, reverse_each, count vs size, etc.).

@ydakuka ydakuka changed the title Add section about Enumerable#lazy Add Enumerable#lazy guideline to "Collections" section Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants