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

Optimize map { ... }.compact calls #15513

Merged
merged 2 commits into from
Jan 9, 2021
Merged

Optimize map { ... }.compact calls #15513

merged 2 commits into from
Jan 9, 2021

Conversation

007lva
Copy link
Contributor

@007lva 007lva commented Jan 8, 2021

Using Enumerable#filter_map, introduced in Ruby 2.7 which makes the same in a single iteration.

using Enumerable#filter_map, supported since Ruby 2.7
@Gargron Gargron merged commit 087ed84 into mastodon:master Jan 9, 2021
@007lva 007lva deleted the refactor/use-Enumerable-filter_map branch January 9, 2021 23:50
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.

None yet

2 participants