aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mathn.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mathn.rb')
-rw-r--r--lib/mathn.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/mathn.rb b/lib/mathn.rb
index 19325f2996..ddfca57681 100644
--- a/lib/mathn.rb
+++ b/lib/mathn.rb
@@ -116,17 +116,22 @@ class Prime
end
class Fixnum
+ remove_method :/
alias / quo
+ alias_method :/, :quo
+ p :fixdiv
+ p [[:fixdiv, 1.div(1)]]
end
class Bignum
+ remove_method :/
alias / quo
end
class Rational
Unify = true
- remove_method(:inspect)
+ remove_method :inspect
def inspect
format "%s/%s", numerator.inspect, denominator.inspect
end