core/src/main/java/org/jruby/RubyBasicObject.java
private static IRubyObject initCopy(ThreadContext context, IRubyObject clone, IRubyObject original, boolean doClone) {
        assert !clone.isFrozen() : "frozen object (" + clone.getMetaClass().getName() + ") allocated";

        original.copySpecialInstanceVariables(clone);

        if (original.hasVariables()) clone.syncVariables(original);
        if (original instanceof RubyModule) {
            RubyModule cloneMod = (RubyModule)clone;
            cloneMod.syncConstants((RubyModule)original);
            cloneMod.syncClassVariables((RubyModule)original);
        }

        /* FIXME: finalizer should be dupped here */
        return doClone ?
                sites(context).initialize_clone.call(context, clone, clone, original) :
                sites(context).initialize_dup.call(context, clone, clone, original);
    }
/** init_copy
     *
     * Initializes a copy with variable and special instance variable
     * information, and then call the initialize_copy Ruby method.
     */
init_copy
Initializes a copy with variable and special instance variable
information, and then call the initialize_copy Ruby method.
init_copy Initializes a copy with variable and special instance variable information and then call the initialize_copy Ruby method .
private static IRubyObject initCopy(ThreadContext context, IRubyObject clone, IRubyObject original, boolean doClone) {
        assert !clone.isFrozen() : "frozen object (" + clone.getMetaClass().getName() + ") allocated";
        original.copySpecialInstanceVariables(clone);
        if (original.hasVariables()) clone.syncVariables(original);
        if (original instanceof RubyModule) {
            RubyModule cloneMod = (RubyModule)clone;
            cloneMod.syncConstants((RubyModule)original);
            cloneMod.syncClassVariables((RubyModule)original);
        }
        /* FIXME: finalizer should be dupped here */
        return doClone ?
                sites(context).initialize_clone.call(context, clone, clone, original) :
                sites(context).initialize_dup.call(context, clone, clone, original);
    }
private static IRubyObject initCopy ( ThreadContext context , IRubyObject clone , IRubyObject original , boolean doClone ) { assert ! clone . isFrozen ( ) : "frozen object (" + clone . getMetaClass ( ) . getName ( ) + ") allocated" ; original . copySpecialInstanceVariables ( clone ) ; if ( original . hasVariables ( ) ) clone . syncVariables ( original ) ; if ( original instanceof RubyModule ) { RubyModule cloneMod = ( RubyModule ) clone ; cloneMod . syncConstants ( ( RubyModule ) original ) ; cloneMod . syncClassVariables ( ( RubyModule ) original ) ; } /* FIXME: finalizer should be dupped here */ return doClone ? sites ( context ) . initialize_clone . call ( context , clone , clone , original ) : sites ( context ) . initialize_dup . call ( context , clone , clone , original ) ; }
init_copy
 Initializes a copy with variable and special instance variable
 information, and then call the initialize_copy Ruby method.
init_copy Initializes a copy with variable and special instance variable information and then call the initialize_copy Ruby method .