summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-30 15:00:12 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-30 15:00:12 +0000
commitef260b085eea729efaa46e93ac71d08a3fa210c6 (patch)
tree3771797df1d09540f20d74f55086885490e6a439 /lib
parent3730710d79aa0bde6ab5b36e18c734dd9718aac0 (diff)
revert git backfire in r15860; sorry
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/complex.rb32
-rw-r--r--lib/rational.rb32
2 files changed, 0 insertions, 64 deletions
diff --git a/lib/complex.rb b/lib/complex.rb
index 505b0120e3..9d926023a7 100644
--- a/lib/complex.rb
+++ b/lib/complex.rb
@@ -1,35 +1,3 @@
-class Integer
-
- def gcd(other)
- min = self.abs
- max = other.abs
- while min > 0
- tmp = min
- min = max % min
- max = tmp
- end
- max
- end
-
- def lcm(other)
- if self.zero? or other.zero?
- 0
- else
- (self.div(self.gcd(other)) * other).abs
- end
- end
-
- def gcdlcm(other)
- gcd = self.gcd(other)
- if self.zero? or other.zero?
- [gcd, 0]
- else
- [gcd, (self.div(gcd) * other).abs]
- end
- end
-
-end
-
module Math
alias exp! exp
diff --git a/lib/rational.rb b/lib/rational.rb
index b12bf7ef38..87c5d3f111 100644
--- a/lib/rational.rb
+++ b/lib/rational.rb
@@ -15,35 +15,3 @@ class Bignum
alias rpower **
end
-
-class Integer
-
- def gcd(other)
- min = self.abs
- max = other.abs
- while min > 0
- tmp = min
- min = max % min
- max = tmp
- end
- max
- end
-
- def lcm(other)
- if self.zero? or other.zero?
- 0
- else
- (self.div(self.gcd(other)) * other).abs
- end
- end
-
- def gcdlcm(other)
- gcd = self.gcd(other)
- if self.zero? or other.zero?
- [gcd, 0]
- else
- [gcd, (self.div(gcd) * other).abs]
- end
- end
-
-end