From 2d4026712e7dd2ddfa61aa3904a168b69e069655 Mon Sep 17 00:00:00 2001 From: tadf Date: Fri, 19 Sep 2008 13:55:52 +0000 Subject: * complex.c: uses f_(in)?exact_p macro. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- lib/complex.rb | 6 ++++-- lib/mathn.rb | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'lib') 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 -- cgit