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: 61ba53c2c0ba
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5f1babf1f8b3
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jul 8, 2015

  1. Copy the full SHA
    1875515 View commit details
  2. [Truffle] Partial fix for zsuper calls in blocks.

    This fixes one very specific case of #3106: zsuper bug with blocks.
    nirvdrum committed Jul 8, 2015
    Copy the full SHA
    5f1babf View commit details
Showing with 19 additions and 10 deletions.
  1. +14 −10 truffle/src/main/java/org/jruby/truffle/nodes/supercall/GeneralSuperReCallNode.java
  2. +5 −0 truffle/src/main/ruby/core/shims.rb
Original file line number Diff line number Diff line change
@@ -64,17 +64,21 @@ public final Object execute(VirtualFrame frame) {
originalArguments = frame.getArguments();
}

// Reload the arguments
Object[] superArguments = new Object[reloadNodes.length];
for (int n = 0; n < superArguments.length; n++) {
superArguments[n] = reloadNodes[n].execute(frame);
}
Object[] superArguments = RubyArguments.extractUserArguments(originalArguments);

if (isSplatted) {
CompilerDirectives.transferToInterpreter();
assert superArguments.length == 1;
assert RubyGuards.isRubyArray(superArguments[0]);
superArguments = ArrayNodes.slowToArray(((RubyBasicObject) superArguments[0]));
if (!inBlock) {
// Reload the arguments
superArguments = new Object[reloadNodes.length];
for (int n = 0; n < superArguments.length; n++) {
superArguments[n] = reloadNodes[n].execute(frame);
}

if (isSplatted) {
CompilerDirectives.transferToInterpreter();
assert superArguments.length == 1;
assert RubyGuards.isRubyArray(superArguments[0]);
superArguments = ArrayNodes.slowToArray(((RubyBasicObject) superArguments[0]));
}
}

// Execute or inherit the block
5 changes: 5 additions & 0 deletions truffle/src/main/ruby/core/shims.rb
Original file line number Diff line number Diff line change
@@ -222,3 +222,8 @@ def to_s
end

end

# Hack to let code run that try to invoke RubyGems directly. We don't yet support RubyGems, but in most cases where
# this call would be made, we've already set up the $LOAD_PATH so the call would no-op anyway.
def gem(*args)
end