Class: Fixnum

Inherits:
Object show all
Defined in:
lib/backports/fixnum.rb

Instance Method Summary collapse

Instance Method Details

#div(n) ⇒ Object

Standard in ruby 1.9. See official documentation



3
4
5
# File 'lib/backports/fixnum.rb', line 3

def div(n)
  (self / n).round
end

#fdiv(n) ⇒ Object

Standard in ruby 1.9. See official documentation



8
9
10
# File 'lib/backports/fixnum.rb', line 8

def fdiv(n)
  to_f / n
end