Class: Integer

Inherits:
Numeric show all
Includes:
Integral
Defined in:
mrblib/numeric.rb,
src/numeric.c

Overview

Integer

ISO 15.2.8

Direct Known Subclasses

Fixnum

Instance Method Summary collapse

Methods included from Integral

#div, #downto, #negative?, #next, #nonzero?, #positive?, #step, #times, #upto, #zero?

Methods inherited from Numeric

#**, #[email protected], #[email protected], #/, #<, #<=, #<=>, #>, #>=, #abs, #finite?, #infinite?, #quo

Methods included from Comparable

#<, #<=, #==, #>, #>=, #between?, #clamp

Instance Method Details

#ceilObject

Returns the receiver simply.

ISO 15.2.8.3.14


712
713
714
715
716
# File 'src/numeric.c', line 712

static mrb_value
int_to_i(mrb_state *mrb, mrb_value num)
{
  return num;
}

#floorObject Also known as: round, truncate

Returns the receiver simply.

ISO 15.2.8.3.17


712
713
714
715
716
# File 'src/numeric.c', line 712

static mrb_value
int_to_i(mrb_state *mrb, mrb_value num)
{
  return num;
}

#to_iInteger #to_intInteger

As int is already an Integer, all these methods simply return the receiver.

Overloads:


712
713
714
715
716
# File 'src/numeric.c', line 712

static mrb_value
int_to_i(mrb_state *mrb, mrb_value num)
{
  return num;
}

#to_iInteger #to_intInteger

As int is already an Integer, all these methods simply return the receiver.

Overloads:


712
713
714
715
716
# File 'src/numeric.c', line 712

static mrb_value
int_to_i(mrb_state *mrb, mrb_value num)
{
  return num;
}