Hi,
When doing a test of my recent changes with hashCode, I got an assertion
failure from TestRubyHash:
result = eval("key = /a/; hash = {key => 'one'}; hash[/a/] =
'two'; puts hash[key]")
assertEquals("one", result);
According to the comments I suspect this is a test of identity for regexps,
but the test result expected doesn't match what my C Ruby does, which means
it have to be an error in the test:
irb(main):001:0> key = /a/
key = /a/
/a/
irb(main):002:0> hash = {key => 'one'}
hash = {key => 'one'}
{/a/=>"one"}
irb(main):003:0> hash[/a/] = 'two'
hash[/a/] = 'two'
"two"
irb(main):004:0> puts hash[key]
puts hash[key]
two
nil
So, according to this, line 92 in test/org/jruby/test/TestRubyHash.java
should be changed from
assertEquals("one", result);
into
assertEquals("two", result);
... Regards
Ola Bini
_______________________________________________
Jruby-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jruby-devel