Skip to content

Commit 5e46bfc

Browse files
committed
Revert "Merge pull request #2443 from Who828/master"
This reverts commit 4ed53f8, reversing changes made to 3a19c89.
1 parent 0d4e9f7 commit 5e46bfc

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

core/src/main/java/org/jruby/RubyArray.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -668,18 +668,13 @@ public RubyFixnum hash19(final ThreadContext context) {
668668
public IRubyObject call(IRubyObject obj, boolean recur) {
669669
int begin = RubyArray.this.begin;
670670
long h = realLength;
671-
long n;
672671
if (recur) {
673672
h ^= RubyNumeric.num2long(invokedynamic(context, context.runtime.getArray(), HASH));
674673
} else {
675674
for (int i = begin; i < begin + realLength; i++) {
675+
h = (h << 1) | (h < 0 ? 1 : 0);
676676
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));
683678
}
684679
}
685680
return getRuntime().newFixnum(h);

0 commit comments

Comments
 (0)