summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-19 13:55:52 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-19 13:55:52 +0000
commit2d4026712e7dd2ddfa61aa3904a168b69e069655 (patch)
tree58ea38242497b45ea49f497d8693123fe508e944 /lib
parent079ac1e1358eb91b2a6790b7229075d0659663fd (diff)
downloadruby-2d4026712e7dd2ddfa61aa3904a168b69e069655.tar.gz
ruby-2d4026712e7dd2ddfa61aa3904a168b69e069655.tar.xz
ruby-2d4026712e7dd2ddfa61aa3904a168b69e069655.zip
* complex.c: uses f_(in)?exact_p macro.
* rational.c: ditto. * bignum.c (rb_big_pow): bignum**bignum - should calculate without rational. * lib/complex.rb: should override Math module at most once. * lib/mathn.rb: requires 'cmath' directly. -この行以下は無視されます -- M complex.c M ChangeLog M lib/mathn.rb M lib/complex.rb M bignum.c M rational.c git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/complex.rb6
-rw-r--r--lib/mathn.rb8
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/complex.rb b/lib/complex.rb
index 1845f30b1..70e168e91 100644
--- a/lib/complex.rb
+++ b/lib/complex.rb
@@ -1,7 +1,9 @@
require 'cmath'
-Object.instance_eval{remove_const :Math}
-Math = CMath
+unless defined?(Math.exp!)
+ Object.instance_eval{remove_const :Math}
+ Math = CMath
+end
def Complex.generic? (other)
other.kind_of?(Integer) ||
diff --git a/lib/mathn.rb b/lib/mathn.rb
index 2af2b83da..b29f994ac 100644
--- a/lib/mathn.rb
+++ b/lib/mathn.rb
@@ -9,11 +9,15 @@
#
#
-require "complex.rb"
-require "rational.rb"
+require "cmath.rb"
require "matrix.rb"
require "prime.rb"
+unless defined?(Math.exp!)
+ Object.instance_eval{remove_const :Math}
+ Math = CMath
+end
+
class Fixnum
remove_method :/
alias / quo