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

🥅 Work around missing server responses #192

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Oct 4, 2023

By converting all of the internal @responses.delete(type) to clear_responses(type), we get empty arrays and don't need nil-checks.

n.b: this will result in some methods sometimes returning an empty array when they previously would have returned nil: list, xlist, getquota, lsub, expunge, uid_expunge, fetch, uid_fetch, store, and uid_store.

By converting all of the internal `@responses.delete(type)` to
`clear_responses(type)`, we get empty arrays and don't need nil-checks.

Fixes #190.
@nevans nevans merged commit 6acb125 into master Oct 4, 2023
@nevans nevans deleted the workaround-no-matching-responses branch October 4, 2023 02:56
nevans added a commit that referenced this pull request Oct 5, 2023
`#fetch` returns an empty array, rather than nil, since #192.
nevans added a commit that referenced this pull request Oct 6, 2023
`#fetch` returns an empty array, rather than nil, since #192.
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.

NoMethodError: undefined method `[]' for nil:NilClass
1 participant