-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Override
StripeObject#eql?
and #hash
to produce more optimistic e…
…quivalency Overrides `#eql?` (hash equality) and `#hash` so that Stripe objects can be used more easily as Hash keys and that certain other frameworks that rely on these methods will have an easier time (e.g. RSpec's `change`, see #687). I think this might be a little controversial if we weren't already overriding the `#==` implementation, but because we are, I think it makes sense to extent it to these two methods as well.
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters