On this page
End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class · Ruby 3.0
Integer
Holds Integer values. You cannot add a singleton method to an Integer object, any attempt to do so will raise a TypeError.
Class methods 3
Instance methods 70
#%
#&
#*
#**
#+
#-
#-@
#/
#<
#<<
#<=
#<=>
#==
#===
#>
#>=
#>>
#[]
#^
#|
#~
#abs
#allbits?
#anybits?
#bit_length
#ceil
#chr
#coerce
#denominator
#digits
#div
#divmod
#downto
#even?
#fdiv
#floor
#gcd
#gcdlcm
#inspect
#integer?
#lcm
#magnitude
#miller_rabin_bases
#miller_rabin_test
#modulo
#next
#nobits?
#numerator
#odd?
#ord
#pow
#pred
#prime?
#prime_division
#rationalize
#remainder
#round
#size
#succ
#times
#to_bn
#to_d
#to_f
#to_i
#to_int
#to_r
#to_s
#truncate
#upto
#zero?
Constants
The version of loaded GMP.
No documentation available