core/src/main/java/org/jruby/RubyStruct.java
@JRubyMethod(rest = true)
    public IRubyObject values_at(IRubyObject[] args) {
        final int olen = values.length;
        RubyArray result = getRuntime().newArray(args.length);

        for (int i = 0; i < args.length; i++) {
            final IRubyObject arg = args[i];
            if ( arg instanceof RubyFixnum ) {
                result.append( aref(arg) );
                continue;
            }

            final int[] begLen;
            if ( ! ( arg instanceof RubyRange ) ) {
                // do result.append
            }
            else if ( ( begLen = ((RubyRange) args[i]).begLenInt(olen, 0) ) == null ) {
                continue;
            }
            else {
                final int beg = begLen[0];
                final int len = begLen[1];
                for (int j = 0; j < len; j++) {
                    result.append( aref(j + beg) );
                }
                continue;
            }
            result.append( aref(RubyNumeric.num2int(arg)) );
        }

        return result;
    }
// NOTE: copied from RubyArray, both RE, Struct, and Array should share one impl
copied from RubyArray, both RE, Struct, and Array should share one impl
copied from RubyArray both RE Struct and Array should share one impl
@JRubyMethod(rest = true)
    public IRubyObject values_at(IRubyObject[] args) {
        final int olen = values.length;
        RubyArray result = getRuntime().newArray(args.length);
        for (int i = 0; i < args.length; i++) {
            final IRubyObject arg = args[i];
            if ( arg instanceof RubyFixnum ) {
                result.append( aref(arg) );
                continue;
            }
            final int[] begLen;
            if ( ! ( arg instanceof RubyRange ) ) {
            }
            else if ( ( begLen = ((RubyRange) args[i]).begLenInt(olen, 0) ) == null ) {
                continue;
            }
            else {
                final int beg = begLen[0];
                final int len = begLen[1];
                for (int j = 0; j < len; j++) {
                    result.append( aref(j + beg) );
                }
                continue;
            }
            result.append( aref(RubyNumeric.num2int(arg)) );
        }
        return result;
    }
@ JRubyMethod ( rest = true ) public IRubyObject values_at ( IRubyObject [ ] args ) { final int olen = values . length ; RubyArray result = getRuntime ( ) . newArray ( args . length ) ; for ( int i = 0 ; i < args . length ; i ++ ) { final IRubyObject arg = args [ i ] ; if ( arg instanceof RubyFixnum ) { result . append ( aref ( arg ) ) ; continue ; } final int [ ] begLen ; if ( ! ( arg instanceof RubyRange ) ) { } else if ( ( begLen = ( ( RubyRange ) args [ i ] ) . begLenInt ( olen , 0 ) ) == null ) { continue ; } else { final int beg = begLen [ 0 ] ; final int len = begLen [ 1 ] ; for ( int j = 0 ; j < len ; j ++ ) { result . append ( aref ( j + beg ) ) ; } continue ; } result . append ( aref ( RubyNumeric . num2int ( arg ) ) ) ; } return result ; }
NOTE: copied from RubyArray, both RE, Struct, and Array should share one impl
NOTE : copied from RubyArray both RE Struct and Array should share one impl
// do result.append