Numeric

class Numeric

Parent:
Object
Included modules:
Comparable

Numeric is the class from which all higher-level numeric classes should inherit-

Numeric allows instantiation of heap-allocated objects. Other core numeric classes such as Integer are implemented as immediates, which means that each Integer is a single immutable object which is always passed by value.

a = 1
puts 1.object_id == a.object_id   #=> true

There can only ever be one instance of the integer 1, for example. Ruby ens