Exemplo n.º 1
0
  @Override
  public Object interpret(
      ThreadContext context,
      DynamicScope currDynScope,
      IRubyObject self,
      Object[] temp,
      Block block) {
    Object receiver = array.retrieve(context, self, currDynScope, temp);

    // Don't call to_ary if we we have an array already and we are asked not to run to_ary on arrays
    if (dontToAryArrays.isTrue() && receiver instanceof RubyArray) {
      return receiver;
    } else {
      return RuntimeHelpers.aryToAry((IRubyObject) receiver);
    }
  }