Class: Integer
- Includes:
- Integral
- Defined in:
- mrblib/numeric.rb,
src/numeric.c
Overview
Integer
ISO 15.2.8
Direct Known Subclasses
Instance Method Summary collapse
-
#ceil ⇒ Object
Returns the receiver simply.
-
#floor ⇒ Object
(also: #round, #truncate)
Returns the receiver simply.
-
#to_i ⇒ Integer
As int is already an
Integer
, all these methods simply return the receiver. -
#to_i ⇒ Integer
As int is already an
Integer
, all these methods simply return the receiver.
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
#ceil ⇒ Object
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; } |
#floor ⇒ Object 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_i ⇒ Integer
As int is already an Integer
, all these
methods simply return the receiver.
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_i ⇒ Integer
As int is already an Integer
, all these
methods simply return the receiver.
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; } |