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

#**, #/, #<, #<=, #<=>, #>, #>=, #__coerce_step_counter, #div, #downto, #next, #quo, #step, #times, #upto

Methods inherited from Numeric

#+@, #-@, #abs, #finite?, #infinite?, #negative?, #nonzero?, #positive?, #to_r, #zero?

Methods included from Comparable

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

Instance Method Details

#ceilObject

Returns the receiver simply.

ISO 15.2.8.3.14



783
784
785
786
787
# File 'src/numeric.c', line 783

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



783
784
785
786
787
# File 'src/numeric.c', line 783

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

#to_iInteger

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

Returns:



783
784
785
786
787
# File 'src/numeric.c', line 783

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

#to_iInteger

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

Returns:



783
784
785
786
787
# File 'src/numeric.c', line 783

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