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

Hash#compare_by_identity does not work correctly when key is destructively changed #3650

Closed
mame opened this Issue Feb 7, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@mame

mame commented Feb 7, 2016

Hello,

h = {}.compare_by_identity
a = [0]
h[a] = 42
a[0] = 1
p h[a] #=> expected: 42, actual: nil

MRI works as I expect. I confirmed this in jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d OpenJDK 64-Bit Server VM 24.95-b01 on 1.7.0_95-b00 +jit [linux-amd64].

kares added a commit to kares/jruby that referenced this issue Feb 18, 2016

@kares kares self-assigned this Feb 18, 2016

@kares kares added the core label Feb 18, 2016

@kares kares added this to the JRuby 9.1.0.0 milestone Feb 18, 2016

@kares kares closed this in 0285d99 Feb 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment