@JRubyMethod(name = "[]", required = 1, rest = true) public final IRubyObject op_aref(ThreadContext context, IRubyObject[] args) { if ( args.length == 1 ) return op_aref(context, args[0]); return getRange(context, args); }
@JRubyMethod(name = "[]", required = 1, rest = true) public final IRubyObject op_aref(ThreadContext context, IRubyObject[] args) { if ( args.length == 1 ) return op_aref(context, args[0]); return getRange(context, args); }
@JRubyMethod(name = "[]", required = 1, rest = true) public IRubyObject op_aref(ThreadContext context, IRubyObject[] args) { if (args.length == 1 && args[0] instanceof RubyInteger) { int index = (int)((RubyInteger)args[0]).getLongValue(); return ArrayUtils.arefDirect(context.runtime, getObject(), converter, index); } else { return getRange(context, args); } }
@JRubyMethod(name = "[]") public IRubyObject op_aref(ThreadContext context, IRubyObject arg) { if (arg instanceof RubyInteger) { int index = (int)((RubyInteger)arg).getLongValue(); return ArrayUtils.arefDirect(context.runtime, getObject(), converter, index); } else { return getRange(context, arg); } }
@JRubyMethod(name = "[]") public IRubyObject op_aref(ThreadContext context, IRubyObject arg) { if (arg instanceof RubyInteger) { int index = (int)((RubyInteger)arg).getLongValue(); return ArrayUtils.arefDirect(context.runtime, getObject(), converter, index); } else { return getRange(context, arg); } }
@JRubyMethod(name = "[]", required = 1, rest = true) public IRubyObject op_aref(ThreadContext context, IRubyObject[] args) { if (args.length == 1 && args[0] instanceof RubyInteger) { int index = (int)((RubyInteger)args[0]).getLongValue(); return ArrayUtils.arefDirect(context.runtime, getObject(), converter, index); } else { return getRange(context, args); } }