core/src/main/java/org/jruby/RubyBasicObject.java
@Override
    public IRubyObject anyToString() {
        Ruby runtime = metaClass.runtime;

        /* 6:tags 16:addr 1:eos */
        String hex = Integer.toHexString(System.identityHashCode(this));
        ByteList className = metaClass.getRealClass().toRubyString(runtime.getCurrentContext()).getByteList();
        ByteList bytes = new ByteList(2 + className.realSize() + 3 + hex.length() + 1);
        bytes.setEncoding(className.getEncoding());
        bytes.append('#').append('<');
        bytes.append(className);
        bytes.append(':').append('0').append('x');
        bytes.append(hex.getBytes());
        bytes.append('>');

        RubyString str = RubyString.newString(runtime, bytes);
        str.setTaint(isTaint());
        return str;
    }
/**
     * Internal method that helps to convert any object into the
     * format of a class name and a hex string inside of #<>.
     */
Internal method that helps to convert any object into the
format of a class name and a hex string inside of #<>.
Internal method that helps to convert any object into the format of a class name and a hex string inside of #< > .
@Override
    public IRubyObject anyToString() {
        Ruby runtime = metaClass.runtime;
        /* 6:tags 16:addr 1:eos */
        String hex = Integer.toHexString(System.identityHashCode(this));
        ByteList className = metaClass.getRealClass().toRubyString(runtime.getCurrentContext()).getByteList();
        ByteList bytes = new ByteList(2 + className.realSize() + 3 + hex.length() + 1);
        bytes.setEncoding(className.getEncoding());
        bytes.append('#').append('<');
        bytes.append(className);
        bytes.append(':').append('0').append('x');
        bytes.append(hex.getBytes());
        bytes.append('>');
        RubyString str = RubyString.newString(runtime, bytes);
        str.setTaint(isTaint());
        return str;
    }
@ Override public IRubyObject anyToString ( ) { Ruby runtime = metaClass . runtime ; /* 6:tags 16:addr 1:eos */ String hex = Integer . toHexString ( System . identityHashCode ( this ) ) ; ByteList className = metaClass . getRealClass ( ) . toRubyString ( runtime . getCurrentContext ( ) ) . getByteList ( ) ; ByteList bytes = new ByteList ( 2 + className . realSize ( ) + 3 + hex . length ( ) + 1 ) ; bytes . setEncoding ( className . getEncoding ( ) ) ; bytes . append ( '#' ) . append ( '<' ) ; bytes . append ( className ) ; bytes . append ( ':' ) . append ( '0' ) . append ( 'x' ) ; bytes . append ( hex . getBytes ( ) ) ; bytes . append ( '>' ) ; RubyString str = RubyString . newString ( runtime , bytes ) ; str . setTaint ( isTaint ( ) ) ; return str ; }
Internal method that helps to convert any object into the
 format of a class name and a hex string inside of #<>.
Internal method that helps to convert any object into the format of a class name and a hex string inside of #< > .