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

✨ Add #extract_responses method #330

Merged
merged 3 commits into from
Sep 26, 2024
Merged

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Sep 25, 2024

This adds Net::IMAP#extract_responses, which behaves similarly to ActiveSupport's Array#extract! (which is a method I often wish we had in ruby core!).

Yields all of the unhandled #responses for a single response type. Removes and returns the responses for which the block returns a true value.

Extracting responses is synchronized with other threads. The lock is released before returning.

This is similar to ActiveSupport's Array#extract!.

Yields all of the unhandled #responses for a single response type.
Removes and returns the responses for which the block returns a true
value.

Extracting responses is synchronized with other threads.  The lock is
released before returning.
@nevans nevans merged commit 2813b4c into ruby:master Sep 26, 2024
9 checks passed
@nevans nevans deleted the extract_responses branch September 26, 2024 13:04
nevans added a commit that referenced this pull request Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant