Navigation Menu

Skip to content

Commit

Permalink
Compiler side of fix for JRUBY-6370, JRUBY-6366.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Jan 23, 2012
1 parent 9bc7d7d commit e82af9a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/org/jruby/runtime/CompiledBlock19.java
Expand Up @@ -183,9 +183,14 @@ private IRubyObject[] setupBlockArgs(IRubyObject value, boolean alreadyArray) {
} else if (value instanceof RubyArray && (alreadyArray || (isRest && requiredCount > 0))) {
parameters = ((RubyArray) value).toJavaArray();
} else if (isRest || requiredCount > 0) {
value = RuntimeHelpers.aryToAry(value);
// 1.7.0 rewrite cannot come fast enough...
if (value instanceof RubyArray) {
parameters = new IRubyObject[] { value };
} else {
value = RuntimeHelpers.aryToAry(value);

parameters = (value instanceof RubyArray) ? ((RubyArray)value).toJavaArray() : new IRubyObject[] { value };
parameters = (value instanceof RubyArray) ? ((RubyArray)value).toJavaArray() : new IRubyObject[] { value };
}
} else {
parameters = new IRubyObject[] { value };
}
Expand Down

0 comments on commit e82af9a

Please sign in to comment.