Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a12b6f123313
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 02515098c106
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 27, 2015

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    20dad68 View commit details
  2. Copy the full SHA
    0251509 View commit details
Original file line number Diff line number Diff line change
@@ -3520,6 +3520,7 @@ public RubyArray sortNull(RubyArray array, UndefinedPlaceholder block) {
@Specialization(guards = {"isIntegerFixnum", "isSmall"})
public RubyArray sortVeryShortIntegerFixnum(VirtualFrame frame, RubyArray array, UndefinedPlaceholder block) {
final int[] store = (int[]) array.getStore();
final int[] newStore = new int[store.length];

final int size = array.getSize();

@@ -3536,10 +3537,11 @@ public RubyArray sortVeryShortIntegerFixnum(VirtualFrame frame, RubyArray array,
}
}
}
newStore[i] = store[i];
}
}

return array;
return new RubyArray(getContext().getCoreLibrary().getArrayClass(), newStore, size);
}

@Specialization(guards = "isIntegerFixnum")
@@ -3556,6 +3558,7 @@ public RubyArray sortIntegerFixnum(VirtualFrame frame, RubyArray array, Undefine
@Specialization(guards = {"isLongFixnum", "isSmall"})
public RubyArray sortVeryShortLongFixnum(VirtualFrame frame, RubyArray array, UndefinedPlaceholder block) {
final long[] store = (long[]) array.getStore();
final long[] newStore = new long[store.length];

final int size = array.getSize();

@@ -3572,10 +3575,11 @@ public RubyArray sortVeryShortLongFixnum(VirtualFrame frame, RubyArray array, Un
}
}
}
newStore[i] = store[i];
}
}

return array;
return new RubyArray(getContext().getCoreLibrary().getArrayClass(), newStore, size);
}

@Specialization(guards = "isLongFixnum")
@@ -3600,7 +3604,8 @@ public RubyArray sortDouble(VirtualFrame frame, RubyArray array, UndefinedPlaceh

@Specialization(guards = {"isObject", "isSmall"})
public RubyArray sortVeryShortObject(VirtualFrame frame, RubyArray array, UndefinedPlaceholder block) {
final Object[] store = (Object[]) array.getStore();
final Object[] oldStore = (Object[]) array.getStore();
final Object[] store = Arrays.copyOf(oldStore, oldStore.length);

// Insertion sort

Original file line number Diff line number Diff line change
@@ -440,7 +440,7 @@ public boolean less(double a, RubyBasicObject other) {
}
}

@CoreMethod(names = "==", required = 1)
@CoreMethod(names = { "==", "===" }, required = 1)
public abstract static class EqualNode extends CoreMethodNode {

@Child private CallDispatchHeadNode fallbackCallNode;