Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -129,17 +129,15 @@ public BlockDefinitionNode compileBlockNode(SourceSection sourceSection, String
}

private boolean shouldConsiderDestructuringArrayArg() {
final boolean shouldConsiderDestructuringArrayArg;
if (argsNode.getPreCount() == 0 && argsNode.getOptionalArgsCount() == 0 && argsNode.getPostCount() == 0 && argsNode.getRestArgNode() == null) {
shouldConsiderDestructuringArrayArg = false;
return false;
} else if (argsNode.getPreCount() + argsNode.getPostCount() == 1 && argsNode.getOptionalArgsCount() == 0 && argsNode.getRestArgNode() == null) {
shouldConsiderDestructuringArrayArg = false;
return false;
} else if (argsNode.getPreCount() == 0 && argsNode.getRestArgNode() != null) {
shouldConsiderDestructuringArrayArg = false;
return false;
} else {
shouldConsiderDestructuringArrayArg = true;
return true;
}
return shouldConsiderDestructuringArrayArg;
}

private RubyNode wrapBody(RubyNode prelude, RubyNode body) {

0 comments on commit 072a236

Please sign in to comment.