Permalink
Browse files

[IR] Dont unwrap array args unless necessary when blocks are called

  • Loading branch information...
subbuss committed Apr 19, 2012
1 parent 0248cf4 commit f882e9d7814c1c73c0de0928bb28bd99b8447c01
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/org/jruby/runtime/InterpretedIRBlockBody19.java
@@ -110,7 +110,7 @@ public IRubyObject yield(ThreadContext context, IRubyObject value, IRubyObject s
// I thought only procs & lambdas can be called, and blocks are yielded to.
if (args.length == 1) {
// Convert value to arg-array, unwrapping where necessary
- args = convertValueIntoArgArray(context, args[0], false, (type == Block.Type.NORMAL) && (args[0] instanceof RubyArray));
+ args = convertValueIntoArgArray(context, args[0], true, (type == Block.Type.NORMAL) && (args[0] instanceof RubyArray));
} else if (arity().getValue() == 1) {
// discard excess arguments
args = (args.length == 0) ? context.getRuntime().getSingleNilArray() : new IRubyObject[] { args[0] };

0 comments on commit f882e9d

Please sign in to comment.