Skip to content

Add == gotcha that can be unintuitive at first#279

Merged
tenderlove merged 1 commit intobcrypt-ruby:masterfrom
federicoaldunate:fix-eql-comment
Oct 29, 2024
Merged

Add == gotcha that can be unintuitive at first#279
tenderlove merged 1 commit intobcrypt-ruby:masterfrom
federicoaldunate:fix-eql-comment

Conversation

@federicoaldunate
Copy link
Contributor

Closes: #266

Unless String == method is redefined, this should be false. This might be unintuitive at first glance.

'string' == BCrypt::Password.create('string') # => False, method of class String is used
BCrypt::Password.create('string') == 'string' # => True, method of class Password is used

@tenderlove tenderlove merged commit 9736ab0 into bcrypt-ruby:master Oct 29, 2024
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.

Unexpected implementation of == method in Password class

2 participants