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

Commits on Jan 11, 2016

  1. Copy the full SHA
    989dcc4 View commit details
  2. [Truffle] Off-by-one.

    chrisseaton committed Jan 11, 2016
    Copy the full SHA
    b307b7e View commit details
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ public RubyNode visitArgsNode(org.jruby.ast.ArgsNode node) {
}

sequence.add(new IfNode(context, sourceSection,
new ArrayIsAtLeastAsLargeAsNode(context, sourceSection, loadArray(sourceSection), node.getPreCount() + node.getPostCount() + 1),
new ArrayIsAtLeastAsLargeAsNode(context, sourceSection, loadArray(sourceSection), node.getPreCount() + node.getPostCount()),
new RunBlockKWArgsHelperNode(context, sourceSection, arraySlotStack.peek().getArraySlot(), keyRestNameOrNil),
new NilNode(context, sourceSection)));
}
Original file line number Diff line number Diff line change
@@ -164,6 +164,8 @@ public BlockDefinitionNode compileBlockNode(SourceSection sourceSection, String
}

private boolean shouldConsiderDestructuringArrayArg(Arity arity) {
if (arity.hasKeywordsRest())
return true;
// If we do not accept any arguments or only one required, there's never any need to destructure
if (!arity.hasRest() && arity.getOptional() == 0 && arity.getRequired() <= 1) {
return false;