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

Complex.hash(hasher). #5100

Merged
merged 1 commit into from
Oct 14, 2017
Merged

Complex.hash(hasher). #5100

merged 1 commit into from
Oct 14, 2017

Conversation

akzhan
Copy link
Contributor

@akzhan akzhan commented Oct 11, 2017

Just allow complex numbers be hashed in predictable way.

@@ -169,6 +169,11 @@ describe "Complex" do
c.clone.should eq(c)
end

it "hashes real without imag like real only" do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: imag => image

Or maybe not (you did the same in the code below) ? Isn't it image in english?

Copy link
Contributor Author

@akzhan akzhan Oct 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imag is known shortcut for Imaginary part of complex number.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok thanks, I didn't know

@RX14 RX14 added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib labels Oct 11, 2017
@ysbaddaden ysbaddaden merged commit 0370db1 into crystal-lang:master Oct 14, 2017
@akzhan akzhan deleted the complex.hash branch October 14, 2017 12:22
@RX14 RX14 added this to the Next milestone Oct 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants