Skip to content

Conversation

undees
Copy link

@undees undees commented Aug 8, 2025

Fixes #20.

The old version of HTTParty::Response implements a custom implementation of #nil? that checks various properties of the body and raw response object. However, the project is interested in removing this method so that the class will behave more like other Ruby classes. (See jnunemaker/httparty#568.) In the meantime, they've put in a deprecation warning for anyone relying on the old custom behaviour.

The neverbounce-api gem isn't doing anything wrong by calling #nil? in the implementation of #require_attr, but by bad luck it's running afoul of the deprecation warning.

This PR works around the warning by calling == nil instead of #.nil? on the attribute's value.

@undees
Copy link
Author

undees commented Aug 12, 2025

See also #22 for running and testing this PR's code on a newer Ruby version.

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.

Deprecation warning "HTTParty will no longer override response#nil?"

1 participant