core/src/main/java/org/jruby/RubyBasicObject.java
@Override
    public RubyInteger convertToInteger() {
        Ruby runtime = metaClass.runtime;
        ThreadContext context = runtime.getCurrentContext();
        BasicObjectSites sites = sites(context);

        IRubyObject result = TypeConverter.convertToType(context, this, runtime.getInteger(), sites.to_int_checked, true);

        if (!(result instanceof RubyInteger)) {
            throw runtime.newTypeError(str(runtime, types(runtime, getMetaClass()), "#to_int should return Integer"));
        }

        return (RubyInteger) result;
    }
/**
     * Tries to convert this object to a Ruby Integer using the "to_int" method.
     * @return an integer representation of this
     */
Tries to convert this object to a Ruby Integer using the "to_int" method.
@return an integer representation of this
Tries to convert this object to a Ruby Integer using the " to_int " method . @return an integer representation of this
@Override
    public RubyInteger convertToInteger() {
        Ruby runtime = metaClass.runtime;
        ThreadContext context = runtime.getCurrentContext();
        BasicObjectSites sites = sites(context);
        IRubyObject result = TypeConverter.convertToType(context, this, runtime.getInteger(), sites.to_int_checked, true);
        if (!(result instanceof RubyInteger)) {
            throw runtime.newTypeError(str(runtime, types(runtime, getMetaClass()), "#to_int should return Integer"));
        }
        return (RubyInteger) result;
    }
@ Override public RubyInteger convertToInteger ( ) { Ruby runtime = metaClass . runtime ; ThreadContext context = runtime . getCurrentContext ( ) ; BasicObjectSites sites = sites ( context ) ; IRubyObject result = TypeConverter . convertToType ( context , this , runtime . getInteger ( ) , sites . to_int_checked , true ) ; if ( ! ( result instanceof RubyInteger ) ) { throw runtime . newTypeError ( str ( runtime , types ( runtime , getMetaClass ( ) ) , "#to_int should return Integer" ) ) ; } return ( RubyInteger ) result ; }
Tries to convert this object to a Ruby Integer using the "to_int" method.
Tries to convert this object to a Ruby Integer using the " to_int " method .