}
@Override
public void assignArray(Ruby runtime, ThreadContext context, IRubyObject self, IRubyObject arg,
Block block) {
RubyArray values = (RubyArray) arg;
int length = values.getLength();
switch (length) {
case 0:
assign(runtime, context, self, block);
break;
case 1:
assign(runtime, context, self, values.eltInternal(0), block);
break;
case 2:
assign(runtime, context, self, values.eltInternal(0), values.eltInternal(1), block);
break;
case 3:
assign(runtime, context, self, values.eltInternal(0), values.eltInternal(1),
values.eltInternal(2), block);
break;
default:
parameter1.assign(runtime, context, self, values.eltInternal(0), block, false);
parameter2.assign(runtime, context, self, values.eltInternal(1), block, false);
parameter3.assign(runtime, context, self, values.eltInternal(2), block, false);
rest.assign(runtime, context, self, values.subseqLight(3, length - 3), block, true);
break;
}
}