class

Integer

v2_4_6 - Show latest stable - Superclass: Numeric

Holds Integer values. You cannot add a singleton method to an Integer. Any attempt to add a singleton method to an Integer object will raise a TypeError.


When mathn is required, Integer’s division is enhanced to return more precise values from mathematical expressions.

2/3*3  # => 0
require 'mathn'
2/3*3  # => 2

(2**72) / ((2**70) * 3)  # => 4/3

frozen_string_literal: false


Add double dispatch to Integer

Constants

GMP_VERSION = rb_sprintf("GMP %s", gmp_version)

Files

  • bignum.c
  • ext/bigdecimal/lib/bigdecimal/util.rb
  • ext/openssl/lib/openssl/bn.rb
  • lib/mathn.rb
  • lib/prime.rb
  • lib/rexml/xpath_parser.rb
  • numeric.c
  • rational.c