Skip to content

Commit

Permalink
Revert "Merge pull request #2443 from Who828/master"
Browse files Browse the repository at this point in the history
This reverts commit 4ed53f8, reversing
changes made to 3a19c89.
  • Loading branch information
headius committed Jan 12, 2015
1 parent 0d4e9f7 commit 5e46bfc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions core/src/main/java/org/jruby/RubyArray.java
Expand Up @@ -668,18 +668,13 @@ public RubyFixnum hash19(final ThreadContext context) {
public IRubyObject call(IRubyObject obj, boolean recur) {
int begin = RubyArray.this.begin;
long h = realLength;
long n;
if (recur) {
h ^= RubyNumeric.num2long(invokedynamic(context, context.runtime.getArray(), HASH));
} else {
for (int i = begin; i < begin + realLength; i++) {
h = (h << 1) | (h < 0 ? 1 : 0);
final IRubyObject value = safeArrayRef(values, i);
n = getRuntime().isSiphashEnabled() ? SipHashInline.hash24(
getRuntime().getHashSeedK0(), 0,
value.toString().getBytes(), begin, realLength) :
PerlHash.hash(getRuntime().getHashSeedK0(),
value.toString().getBytes(), begin, realLength);
h ^= n;
h ^= RubyNumeric.num2long(invokedynamic(context, value, HASH));
}
}
return getRuntime().newFixnum(h);
Expand Down

0 comments on commit 5e46bfc

Please sign in to comment.