Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

It's Integer#rationalize, not Numeric#rationalize

  • Loading branch information...
commit 581eee8e4667f49cafc76d519966d6e4971f43f5 1 parent 165caf1
John Firebaugh jfirebaugh authored
4 kernel/common/integer19.rb
@@ -52,6 +52,10 @@ def gcd(other)
52 52 max
53 53 end
54 54
  55 + def rationalize(eps = nil)
  56 + Rational(self, 1)
  57 + end
  58 +
55 59 #
56 60 # In an integer, the value _is_ the numerator of its rational equivalent.
57 61 # Therefore, this method returns +self+.
4 kernel/common/numeric19.rb
@@ -49,10 +49,6 @@ def conjugate
49 49 end
50 50 alias_method :conj, :conjugate
51 51
52   - def rationalize(eps = nil)
53   - Rational(self, 1)
54   - end
55   -
56 52 def rect
57 53 [self, 0]
58 54 end

0 comments on commit 581eee8

Please sign in to comment.
Something went wrong with that request. Please try again.