File tree 1 file changed +2
-7
lines changed
core/src/main/java/org/jruby
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -668,18 +668,13 @@ public RubyFixnum hash19(final ThreadContext context) {
668
668
public IRubyObject call (IRubyObject obj , boolean recur ) {
669
669
int begin = RubyArray .this .begin ;
670
670
long h = realLength ;
671
- long n ;
672
671
if (recur ) {
673
672
h ^= RubyNumeric .num2long (invokedynamic (context , context .runtime .getArray (), HASH ));
674
673
} else {
675
674
for (int i = begin ; i < begin + realLength ; i ++) {
675
+ h = (h << 1 ) | (h < 0 ? 1 : 0 );
676
676
final IRubyObject value = safeArrayRef (values , i );
677
- n = getRuntime ().isSiphashEnabled () ? SipHashInline .hash24 (
678
- getRuntime ().getHashSeedK0 (), 0 ,
679
- value .toString ().getBytes (), begin , realLength ) :
680
- PerlHash .hash (getRuntime ().getHashSeedK0 (),
681
- value .toString ().getBytes (), begin , realLength );
682
- h ^= n ;
677
+ h ^= RubyNumeric .num2long (invokedynamic (context , value , HASH ));
683
678
}
684
679
}
685
680
return getRuntime ().newFixnum (h );
You can’t perform that action at this time.
0 commit comments