From 399dace5edc9380b66d709108195c71fc418f1ab Mon Sep 17 00:00:00 2001 From: marcandre Date: Thu, 24 Sep 2009 00:42:23 +0000 Subject: [PATCH] * lib/mathn.rb (Bignum#**): Fixed bignum**fixnum that was broken when requiring lib/mathn [ruby-core:25740] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ lib/mathn.rb | 4 ++-- lib/rational.rb | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0315699ef2..b55133f937 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Sep 24 09:41:42 2009 Marc-Andre Lafortune + + * lib/mathn.rb (Bignum#**): Fixed bignum**fixnum that was broken when + requiring lib/mathn + [ruby-core:25740] + Thu Sep 24 02:21:23 2009 Nobuyoshi Nakada * ext/bigdecimal/lib/bigdecimal/math.rb (atan): atan(Infinity) is diff --git a/lib/mathn.rb b/lib/mathn.rb index 57eac113c7..f834893f3f 100644 --- a/lib/mathn.rb +++ b/lib/mathn.rb @@ -25,7 +25,7 @@ class Fixnum remove_method :/ alias / quo - alias power! ** unless defined?(0.power!) + alias power! ** unless method_defined? :power! def ** (other) if self < 0 && other.round != other @@ -41,7 +41,7 @@ class Bignum remove_method :/ alias / quo - alias power! ** unless defined?(0.power!) + alias power! ** unless method_defined? :power! def ** (other) if self < 0 && other.round != other diff --git a/lib/rational.rb b/lib/rational.rb index 515c273d54..a1aeca1e40 100644 --- a/lib/rational.rb +++ b/lib/rational.rb @@ -7,7 +7,7 @@ class Fixnum alias quof fdiv alias rdiv quo - alias power! ** unless defined?(0.power!) + alias power! ** unless method_defined? :power! alias rpower ** end @@ -17,7 +17,7 @@ class Bignum alias quof fdiv alias rdiv quo - alias power! ** unless defined?(0.power!) + alias power! ** unless method_defined? :power! alias rpower ** end