Package org.jruby
Class RubyFixnum
java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.RubyNumeric
org.jruby.RubyInteger
org.jruby.RubyFixnum
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IRubyObject>,Constantizable,InstanceVariables,InternalVariables,IRubyObject,CoreObjectType
Implementation of the Integer (Fixnum internal) class.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.RubyNumeric
RubyNumeric.InvalidIntegerException, RubyNumeric.NumberTooLargeExceptionNested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.DataNested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intstatic final intstatic final longstatic final longstatic final longstatic final longstatic final longstatic final boolean(package private) final longFields inherited from class org.jruby.RubyInteger
SINGLE_CHAR_BYTELISTS, SINGLE_CHAR_BYTELISTS19, SINGLE_CHAR_UTF8_BYTELISTSFields inherited from class org.jruby.RubyNumeric
DBL_EPSILONFields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATORFields inherited from class org.jruby.RubyBasicObject
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, UNTRUST_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStampFields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY -
Constructor Summary
ConstructorsModifierConstructorDescriptionRubyFixnum(Ruby runtime) privateRubyFixnum(RubyClass klazz, long value) RubyFixnum(Ruby runtime, long value) -
Method Summary
Modifier and TypeMethodDescriptionabs(ThreadContext context) fix_absprivate RubyIntegeraddAsBignum(ThreadContext context, long other) private RubyIntegeraddFixnum(ThreadContext context, RubyFixnum other) private IRubyObjectaddOther(ThreadContext context, IRubyObject other) rb_to_id Will try to convert this object to a String using the Ruby "to_str" if the object isn't already a String.bit_length(ThreadContext context) private static RubyFixnumcachedFixnum(Ruby runtime, long value) ceil(ThreadContext context, IRubyObject arg) rb_fix_ceilprivate voidcheckZeroDivisionError(ThreadContext context, IRubyObject other) private IRubyObjectcompareOther(ThreadContext context, IRubyObject other) final intcompareTo(IRubyObject other) Compares this Ruby object with another.private intcompareToOther(IRubyObject other) constant()convertToInteger(String method) Tries to convert this object to a Ruby Integer using the supplied conversion method.static RubyClasscreateFixnumClass(Ruby runtime) denominator(ThreadContext context) numeric_denominatordigits(ThreadContext context, IRubyObject base) rb_fix_digitsdivmod(ThreadContext context, IRubyObject other) fix_divmodprivate IRubyObjectdivmodFixnum(ThreadContext context, RubyFixnum other) final booleaneql(IRubyObject other) short circuit for Fixnum key comparisonequal_p(ThreadContext context, IRubyObject obj) rb_obj_equal Will use Java identity equality.booleanThis override does not do a "checked" dispatch.even_p(ThreadContext context) final booleanfastEqual(RubyFixnum other) fdivDouble(ThreadContext context, IRubyObject y) static RubyFixnumprivate static IRubyObjectprivate static longprivate static booleanfixnumable(long value) Determine whether the given long value is in fixnum range.floor(ThreadContext context, IRubyObject arg) rb_fix_floorstatic RubyFixnumdoubleintReturn the value of this numeric as a 32-bit long.Class<?>Will return the Java interface that most closely can represent this object, when working through Java integration translations.longReturn the value of this numeric as a 64-bit long.This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are.rb_singleton_class Note: this method is specialized for RubyFixnum, RubySymbol, RubyNil and RubyBoolean Will either return the existing singleton class for this object, or create a new one and return that.hash()rb_obj_id Will return the hash code of this object.final inthashCode()This override does not do "checked" dispatch since Object usually has #hash defined.id()rb_obj_id Return the internal id of an object.idiv(ThreadContext context, long other) idiv(ThreadContext context, long y, String method) Deprecated.idiv(ThreadContext context, IRubyObject other) fix_div here is terrible MRI gotcha: 1.div 3.0 -> 0 1 / 3.0 -> 0.3333333333333333 MRI is also able to do it in one place by looking at current frame in rb_num_coerce_bin: rb_funcall(x, ruby_frame->orig_func, 1, y); also note that RubyFloat doesn't override Numeric.dividiv(ThreadContext context, IRubyObject other, String method) Deprecated.idiv(ThreadContext context, IRubyObject other, CallSite site) private RubyIntegeridivLong(ThreadContext context, long x, long y) static IRubyObjectinduced_from(IRubyObject recv, IRubyObject other) Deprecated.protected booleanint_round_zero_p(ThreadContext context, int ndigits) protected IRubyObjectintPowTmp1(ThreadContext context, RubyInteger y, long mm, boolean negaFlg) (package private) IRubyObjectintPowTmp2(ThreadContext context, RubyInteger y, long mm, boolean negaFlg) protected IRubyObjectintPowTmp2(ThreadContext context, IRubyObject y, long mm, boolean negaFlg) Deprecated.booleanIs object immediate (def: Fixnum, Symbol, true, false, nil?).private static booleanisInCacheRange(long value) isNegative(ThreadContext context) num_negative_p(package private) final booleanisOne()isPositive(ThreadContext context) num_positive_pfinal booleanisZero()private RubyIntegerlshift(ThreadContext context, long width) magnitude(ThreadContext context) fix_abs/1.9static RubyFixnum(package private) IRubyObjectmodulo(ThreadContext context, long other) modulo(ThreadContext context, IRubyObject other) num_moduloprivate IRubyObjectmoduloFixnum(ThreadContext context, long other) private IRubyObjectmoduloFixnum(ThreadContext context, RubyFixnum other) private static RubyFixnummulModulo(ThreadContext context, RubyFixnum a, RubyFixnum b, long c) private IRubyObjectmultiplyOther(ThreadContext context, IRubyObject other) negate()private static RubyIntegerfinal RubyFixnumnewFixnum(long newValue) Deprecated.static RubyFixnumnonzero_p(ThreadContext context) num_nonzero_pnumerator(ThreadContext context) numeric_numeratorodd_p(ThreadContext context) static RubyFixnumop_and(ThreadContext context, long other) op_and(ThreadContext context, IRubyObject other) fix_andop_aref(ThreadContext context, IRubyObject other) fix_arefop_cmp(ThreadContext context, double other) op_cmp(ThreadContext context, long other) op_cmp(ThreadContext context, IRubyObject other) fix_cmpop_div(ThreadContext context, long other) op_div(ThreadContext context, IRubyObject other) op_equal(ThreadContext context, double other) op_equal(ThreadContext context, long other) op_equal(ThreadContext context, IRubyObject other) fix_equalbooleanop_equal_boolean(ThreadContext context, long other) private IRubyObjectop_equalOther(ThreadContext context, IRubyObject other) op_ge(ThreadContext context, long other) op_ge(ThreadContext context, IRubyObject other) fix_gebooleanop_ge_boolean(ThreadContext context, long other) private IRubyObjectop_geOther(ThreadContext context, IRubyObject other) op_gt(ThreadContext context, long other) op_gt(ThreadContext context, IRubyObject other) fix_gtbooleanop_gt_boolean(ThreadContext context, long other) private IRubyObjectop_gtOther(ThreadContext context, IRubyObject other) op_le(ThreadContext context, long other) op_le(ThreadContext context, IRubyObject other) fix_lebooleanop_le_boolean(ThreadContext context, long other) private IRubyObjectop_leOther(ThreadContext context, IRubyObject other) op_lshift(long width) Deprecated.op_lshift(ThreadContext context, long width) op_lshift(ThreadContext context, IRubyObject other) fix_lshiftop_lt(ThreadContext context, long other) op_lt(ThreadContext context, IRubyObject other) fix_ltbooleanop_lt_boolean(ThreadContext context, long other) private IRubyObjectop_ltOther(ThreadContext context, IRubyObject other) op_minus(ThreadContext context, double other) op_minus(ThreadContext context, long other) op_minus(ThreadContext context, IRubyObject other) fix_minusop_minus_one(ThreadContext context) op_minus_two(ThreadContext context) op_mod(ThreadContext context, long other) op_mod(ThreadContext context, IRubyObject other) fix_modop_mul(ThreadContext context, double other) op_mul(ThreadContext context, long other) op_mul(ThreadContext context, IRubyObject other) fix_mulop_neg(ThreadContext context) fix_revop_or(ThreadContext context, long other) op_or(ThreadContext context, IRubyObject other) fix_orop_plus(ThreadContext context, double other) op_plus(ThreadContext context, long other) op_plus(ThreadContext context, IRubyObject other) fix_plusop_plus_one(ThreadContext context) op_plus_two(ThreadContext context) op_pow(ThreadContext context, long other) op_pow(ThreadContext context, IRubyObject other) fix_powop_pow_19(ThreadContext context, IRubyObject other) Deprecated.op_rshift(long width) Deprecated.op_rshift(ThreadContext context, long width) op_rshift(ThreadContext context, IRubyObject other) fix_rshiftop_uminus(ThreadContext context) fix_uminusop_xor(ThreadContext context, long other) op_xor(ThreadContext context, IRubyObject other) fix_xorprivate RubyNumericpowerFixnum(ThreadContext context, RubyFixnum other) private IRubyObjectpowerOther(ThreadContext context, IRubyObject other) pred(ThreadContext context) remainder(ThreadContext context, IRubyObject y) num_remainderprivate RubyFixnumrshift(ThreadContext context, long width) intsignum()private static JavaSites.FixnumSitessites(ThreadContext context) size(ThreadContext context) fix_sizesqrt(ThreadContext context) private RubyIntegersubtractAsBignum(ThreadContext context, long other) private IRubyObjectsubtractOther(ThreadContext context, IRubyObject other) succ(ThreadContext context) int_succtaint(ThreadContext context) rb_obj_taint call-seq: obj.taint -> obj Marks obj as tainted---if the$SAFElevel is set appropriately, many method calls which might alter the running programs environment will refuse to accept tainted strings.static RubyFixnumtimes(ThreadContext context, Block block) to_f()to_f(ThreadContext context) fix_to_fto_s()rb_any_to_s call-seq: obj.to_s => string Returns a string representing obj.to_s(IRubyObject arg0) to_s(IRubyObject[] args) fix_to_sto_sym()Deprecated.truncate(ThreadContext context, IRubyObject arg) rb_fix_truncatestatic RubyFixnumstatic RubyFixnumunmarshalFrom(UnmarshalStream input) static RubyFixnumzero_p()Deprecated.zero_p(ThreadContext context) fix_zero_pMethods inherited from class org.jruby.RubyInteger
allbits_p, anybits_p, ceil, ceil, chr, chr, chr19, chr19, convertToInteger, createIntegerClass, digits, div_div, downto, duckUpto, fdiv, fixnumUpto, floor, floor, floorSqrt, floorSqrt, gcd, gcdlcm, induced_from, int_half_p_half_down, int_half_p_half_even, int_half_p_half_up, int_round_half_down, int_round_half_even, int_round_half_up, integer_p, intPowTmp3, intValue, isNegative, isPositive, lcm, nobits_p, op_aref, op_idiv, op_lshift, op_neg, op_rshift, op_uminus, ord, pow, pow, rationalize, round, round, round, round, round, round19, round19, roundShared, singleCharByteList, singleCharString, singleCharUTF8ByteList, size, sqrt, timesSize, to_i, to_r, toFloat, toInteger, truncate, truncate, uptoMethods inherited from class org.jruby.RubyNumeric
abs2, arg, asNumeric, callCoerced, callCoerced, callCoerced, callCoerced, checkInt, checkInt, coerce, coerceBin, coerceBin, coerceBit, coerceBit, coerceBody, coerceCmp, coerceCmp, coerceFailed, coerceRelOp, coerceRelOp, coerceRescue, compareWithZero, conjugate, createNumericClass, dbl_cmp, dbl2ival, dbl2num, div, div19, divmod19, doCoerce, dup, eql_p, finite_p, fix2int, fix2int, fix2long, fixable, float2long, float2ulong, floatStep, floatStep, floatStepSize, getCoerced, getRoundingMode, image, infinite_p, initialize_copy, int2fix, intervalStepSize, isReal, modulo19, negativeInt, negFixable, negFixable, newNumeric, num_imaginary, num2chr, num2dbl, num2dbl, num2fix, num2int, num2long, num2ulong, numFuncall, numFuncall, numRemainder, op_cmp, op_not, op_num_equal, op_uplus, polar, posFixable, posFixable, positiveInt, quo, quo_19, rbClone, rbClone, rbClone, rbClone, real, real_p, rect, scalar_p, singleton_method_added, step, str2fnum, str2fnum, str2fnum, str2fnum19, str2inum, str2inum, str2inum, to_c, to_int, toJavaMethods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, createObjectClass, dig, dig1, dig2, eqlInternal, equalInternal, inspect, op_eqq, puts, specificEval, toRubyString, toStringMethods inherited from class org.jruby.RubyBasicObject
addFinalizer, anyToString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, checkStringType19, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, defaultToJava, display, ensureInstanceVariablesSettable, eql_p, equal_p19, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, freeze, frozen_p, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClassClone, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, infectBy, infectBy, infectBy, initialize, initialize19, inspect, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval19, instance_eval19, instance_eval19, instance_eval19, instance_exec, instance_exec19, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, instance_variables19, isBuiltin, isClass, isFalse, isFrozen, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, method, method_missing, method_missing19, method19, methods, methods, methods19, methodsImpl, nil_p, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_equal_19, op_match, op_match19, op_not_equal, op_not_match, private_methods, private_methods19, protected_methods, protected_methods19, public_methods, public_methods19, rbInspect, recacheBuiltinMethods, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respond_to_p, respond_to_p19, respond_to_p19, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, send19, send19, send19, send19, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method, singleton_method_added, singleton_method_added19, singleton_method_removed, singleton_method_removed19, singleton_method_undefined, singleton_method_undefined19, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, tainted, tainted_p, testFrozen, testFrozen, to_a, to_a, trust, type, type_deprecated, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnder
-
Field Details
-
value
final long value -
BIT_SIZE
private static final int BIT_SIZE- See Also:
-
SIGN_BIT
public static final long SIGN_BIT- See Also:
-
MAX
public static final long MAX- See Also:
-
MIN
public static final long MIN- See Also:
-
MAX_MARSHAL_FIXNUM
public static final long MAX_MARSHAL_FIXNUM- See Also:
-
MIN_MARSHAL_FIXNUM
public static final long MIN_MARSHAL_FIXNUM- See Also:
-
USE_CACHE
public static final boolean USE_CACHE -
CACHE_OFFSET
public static final int CACHE_OFFSET
-
-
Constructor Details
-
RubyFixnum
-
RubyFixnum
-
RubyFixnum
-
-
Method Details
-
createFixnumClass
-
fixCoerce
-
getNativeClassIndex
Description copied from class:RubyObjectThis is overridden in the other concrete Java builtins to provide a fast way to determine what type they are. Will generally return a value from org.jruby.runtime.ClassIndex- Specified by:
getNativeClassIndexin interfaceCoreObjectType- Overrides:
getNativeClassIndexin classRubyObject- See Also:
-
constant
- Specified by:
constantin interfaceConstantizable- See Also:
-
eql
short circuit for Fixnum key comparison- Specified by:
eqlin interfaceIRubyObject- Overrides:
eqlin classRubyBasicObject
-
equal_p
Description copied from class:RubyBasicObjectrb_obj_equal Will use Java identity equality.- Overrides:
equal_pin classRubyBasicObject
-
fixnumable
private static boolean fixnumable(long value) Determine whether the given long value is in fixnum range.- Parameters:
value- the value in question- Returns:
- true if the value is in fixnum range, false otherwise
-
isImmediate
public boolean isImmediate()Description copied from class:RubyBasicObjectIs object immediate (def: Fixnum, Symbol, true, false, nil?).- Specified by:
isImmediatein interfaceIRubyObject- Overrides:
isImmediatein classRubyBasicObject- Returns:
-
getSingletonClass
Description copied from class:RubyBasicObjectrb_singleton_class Note: this method is specialized for RubyFixnum, RubySymbol, RubyNil and RubyBoolean Will either return the existing singleton class for this object, or create a new one and return that.- Specified by:
getSingletonClassin interfaceIRubyObject- Overrides:
getSingletonClassin classRubyBasicObject- Returns:
- the Ruby singleton class
-
getJavaClass
Description copied from class:RubyBasicObjectWill return the Java interface that most closely can represent this object, when working through Java integration translations.- Specified by:
getJavaClassin interfaceIRubyObject- Overrides:
getJavaClassin classRubyBasicObject- Returns:
- the true Java class of this (Ruby) object
-
getDoubleValue
public double getDoubleValue()- Overrides:
getDoubleValuein classRubyNumeric
-
getLongValue
public long getLongValue()Description copied from class:RubyNumericReturn the value of this numeric as a 64-bit long. If the value does not fit in 64 bits, it will be truncated.- Overrides:
getLongValuein classRubyNumeric
-
getIntValue
public int getIntValue()Description copied from class:RubyNumericReturn the value of this numeric as a 32-bit long. If the value does not fit in 32 bits, it will be truncated.- Overrides:
getIntValuein classRubyNumeric
-
getBigIntegerValue
- Overrides:
getBigIntegerValuein classRubyNumeric
-
signum
public int signum()- Overrides:
signumin classRubyInteger
-
negate
- Overrides:
negatein classRubyInteger
-
newFixnum
-
isInCacheRange
private static boolean isInCacheRange(long value) -
cachedFixnum
-
newFixnum
Deprecated. -
zero
-
one
-
two
-
three
-
four
-
five
-
minus_one
-
hash
Description copied from class:RubyBasicObjectrb_obj_id Will return the hash code of this object. In comparison to MRI, this method will use the Java identity hash code instead of using rb_obj_id, since the usage of id in JRuby will incur the cost of some. ObjectSpace maintenance.- Overrides:
hashin classRubyBasicObject
-
hashCode
public final int hashCode()Description copied from class:RubyObjectThis override does not do "checked" dispatch since Object usually has #hash defined.- Overrides:
hashCodein classRubyObject- See Also:
-
fixHash
-
times
- Overrides:
timesin classRubyInteger
-
ceil
rb_fix_ceil- Specified by:
ceilin classRubyInteger
-
floor
rb_fix_floor- Specified by:
floorin classRubyInteger
-
truncate
rb_fix_truncate- Specified by:
truncatein classRubyInteger
-
digits
rb_fix_digits- Specified by:
digitsin classRubyInteger
-
to_s
fix_to_s -
to_s
Description copied from class:RubyBasicObjectrb_any_to_s call-seq: obj.to_s => string Returns a string representing obj. The defaultto_sprints the object's class and an encoding of the object id. As a special case, the top-level object that is the initial execution context of Ruby programs returns ``main.''- Specified by:
to_sin classRubyInteger
-
to_s
- Specified by:
to_sin classRubyInteger
-
to_sym
Deprecated.fix_to_sym -
op_uminus
fix_uminus- Specified by:
op_uminusin classRubyInteger
-
negate
-
op_plus
fix_plus- Specified by:
op_plusin classRubyInteger
-
op_plus
- Overrides:
op_plusin classRubyInteger
-
op_plus
-
op_plus_one
-
op_plus_two
-
addFixnum
-
addAsBignum
-
addOther
-
op_minus
fix_minus- Specified by:
op_minusin classRubyInteger
-
op_minus
- Overrides:
op_minusin classRubyInteger
-
op_minus
-
op_minus_one
- Parameters:
context-- Returns:
- RubyInteger
-
op_minus_two
- Parameters:
context-- Returns:
- RubyInteger
-
subtractAsBignum
-
subtractOther
-
op_mul
fix_mul- Specified by:
op_mulin classRubyInteger
-
multiplyOther
-
op_mul
- Overrides:
op_mulin classRubyInteger
-
op_mul
-
idiv
fix_div here is terrible MRI gotcha: 1.div 3.0 -> 0 1 / 3.0 -> 0.3333333333333333 MRI is also able to do it in one place by looking at current frame in rb_num_coerce_bin: rb_funcall(x, ruby_frame->orig_func, 1, y); also note that RubyFloat doesn't override Numeric.div- Specified by:
idivin classRubyInteger
-
idiv
- Overrides:
idivin classRubyNumeric
-
op_div
- Specified by:
op_divin classRubyInteger
-
op_div
-
odd_p
- Overrides:
odd_pin classRubyInteger
-
even_p
- Overrides:
even_pin classRubyInteger
-
pred
- Overrides:
predin classRubyInteger
-
idiv
Deprecated. -
idiv
-
idiv
Deprecated. -
idivLong
-
op_mod
fix_mod- Specified by:
op_modin classRubyInteger
-
op_mod
- Overrides:
op_modin classRubyInteger
-
modulo
Description copied from class:RubyNumericnum_modulo- Overrides:
moduloin classRubyNumeric
-
modulo
- Overrides:
moduloin classRubyNumeric
-
moduloFixnum
-
moduloFixnum
-
divmod
fix_divmod- Overrides:
divmodin classRubyInteger
-
divmodFixnum
-
op_pow
fix_pow- Specified by:
op_powin classRubyInteger
-
op_pow
-
op_pow_19
Deprecated. -
powerOther
-
powerFixnum
-
intPowTmp1
-
intPowTmp2
@Deprecated protected IRubyObject intPowTmp2(ThreadContext context, IRubyObject y, long mm, boolean negaFlg) Deprecated. -
intPowTmp2
-
mulModulo
-
abs
fix_abs- Specified by:
absin classRubyInteger
-
magnitude
fix_abs/1.9- Overrides:
magnitudein classRubyInteger
-
op_equal
fix_equal- Specified by:
op_equalin interfaceIRubyObject- Specified by:
op_equalin classRubyInteger
-
op_equal
-
op_equal
-
op_equal_boolean
-
fastEqual
-
op_equalOther
-
equals
Description copied from class:RubyObjectThis override does not do a "checked" dispatch.- Overrides:
equalsin classRubyObject- See Also:
-
compareTo
Description copied from class:RubyBasicObjectCompares this Ruby object with another.- Specified by:
compareToin interfaceComparable<IRubyObject>- Overrides:
compareToin classRubyBasicObject- Parameters:
other- another IRubyObject- Returns:
- 0 if equal, < 0 if this is less than other, > 0 if this is greater than other
-
compareToOther
-
op_cmp
fix_cmp- Specified by:
op_cmpin classRubyInteger
-
op_cmp
-
op_cmp
-
compareOther
-
op_gt
fix_gt- Overrides:
op_gtin classRubyInteger
-
op_gt
-
op_gt_boolean
-
op_gtOther
-
op_ge
fix_ge- Overrides:
op_gein classRubyInteger
-
op_ge
-
op_ge_boolean
-
op_geOther
-
op_lt
fix_lt- Overrides:
op_ltin classRubyInteger
-
op_lt
-
op_lt_boolean
-
op_ltOther
-
op_le
fix_le- Overrides:
op_lein classRubyInteger
-
op_le
-
op_le_boolean
-
op_leOther
-
op_neg
fix_rev- Specified by:
op_negin classRubyInteger
-
op_and
fix_and- Specified by:
op_andin classRubyInteger
-
op_and
-
op_or
fix_or- Specified by:
op_orin classRubyInteger
-
op_or
-
op_xor
fix_xor- Specified by:
op_xorin classRubyInteger
-
op_xor
-
op_aref
fix_aref- Specified by:
op_arefin classRubyInteger
-
op_lshift
fix_lshift- Specified by:
op_lshiftin classRubyInteger
-
op_lshift
- Overrides:
op_lshiftin classRubyInteger
-
lshift
-
op_lshift
Deprecated. -
op_rshift
fix_rshift- Specified by:
op_rshiftin classRubyInteger
-
op_rshift
- Overrides:
op_rshiftin classRubyInteger
-
rshift
-
op_rshift
Deprecated. -
to_f
fix_to_f- Specified by:
to_fin classRubyInteger
-
to_f
- Overrides:
to_fin classRubyInteger
-
size
fix_size- Specified by:
sizein classRubyInteger
-
zero_p
Deprecated. -
zero_p
fix_zero_p- Specified by:
zero_pin classRubyInteger
-
isZero
public final boolean isZero()- Overrides:
isZeroin classRubyNumeric
-
nonzero_p
Description copied from class:RubyNumericnum_nonzero_p- Overrides:
nonzero_pin classRubyNumeric
-
isOne
final boolean isOne()- Overrides:
isOnein classRubyInteger
-
succ
Description copied from class:RubyIntegerint_succ- Overrides:
succin classRubyInteger
-
bit_length
- Specified by:
bit_lengthin classRubyInteger
-
id
Description copied from class:RubyBasicObjectrb_obj_id Return the internal id of an object.- Specified by:
idin interfaceIRubyObject- Overrides:
idin classRubyBasicObject- Returns:
- the object id
-
taint
Description copied from class:RubyBasicObjectrb_obj_taint call-seq: obj.taint -> obj Marks obj as tainted---if the$SAFElevel is set appropriately, many method calls which might alter the running programs environment will refuse to accept tainted strings.- Overrides:
taintin classRubyBasicObject
-
asJavaString
Description copied from class:RubyBasicObjectrb_to_id Will try to convert this object to a String using the Ruby "to_str" if the object isn't already a String. If this still doesn't work, will throw a Ruby TypeError.- Specified by:
asJavaStringin interfaceIRubyObject- Overrides:
asJavaStringin classRubyBasicObject- Returns:
- a (Java) string
-
unmarshalFrom
- Throws:
IOException
-
checkZeroDivisionError
-
convertToInteger
Description copied from class:RubyBasicObjectTries to convert this object to a Ruby Integer using the supplied conversion method.- Specified by:
convertToIntegerin interfaceIRubyObject- Overrides:
convertToIntegerin classRubyBasicObject- Parameters:
method- conversion method to use e.g. "to_i"- Returns:
- an integer representation of this
-
fdivDouble
- Specified by:
fdivDoublein classRubyInteger
-
isNegative
Description copied from class:RubyNumericnum_negative_p- Overrides:
isNegativein classRubyInteger
-
isPositive
Description copied from class:RubyNumericnum_positive_p- Overrides:
isPositivein classRubyInteger
-
int_round_zero_p
- Overrides:
int_round_zero_pin classRubyInteger
-
numerator
Description copied from class:RubyNumericnumeric_numerator- Overrides:
numeratorin classRubyInteger
-
denominator
Description copied from class:RubyNumericnumeric_denominator- Overrides:
denominatorin classRubyInteger
-
convertToRational
- Overrides:
convertToRationalin classRubyNumeric
-
remainder
Description copied from class:RubyNumericnum_remainder- Overrides:
remainderin classRubyInteger
-
sqrt
- Specified by:
sqrtin classRubyInteger
-
sites
-
induced_from
Deprecated.rb_fix_induced_from
-