Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (21 sloc) 0.436 kb
# :enddoc:
class Rational < Numeric
def div(other)
if other.is_a?(Float) && other == 0.0
raise ZeroDivisionError, "division by zero"
end
(self / other).floor
end
end
class Fixnum
alias quof fdiv
alias rdiv quo
alias power! ** unless method_defined? :power!
alias rpower **
end
class Bignum
alias quof fdiv
alias rdiv quo
alias power! ** unless method_defined? :power!
alias rpower **
end
Jump to Line
Something went wrong with that request. Please try again.