diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-05 12:30:54 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-05 12:30:54 +0000 |
commit | c3986f280576ec408f2b26fd9a1edeb177059d69 (patch) | |
tree | f3c6db0a552cff4154c767c46464182763ae7750 /lib/mathn.rb | |
parent | a64f397403c03d9d613294861c3c9b4df05dd454 (diff) | |
download | ruby-c3986f280576ec408f2b26fd9a1edeb177059d69.tar.gz |
* lib/rational.rb: resolved conflicts of aliases.
* lib/mathn.rb: avoided some warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/mathn.rb')
-rw-r--r-- | lib/mathn.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/mathn.rb b/lib/mathn.rb index a4a006e2d6..992eae7098 100644 --- a/lib/mathn.rb +++ b/lib/mathn.rb @@ -59,9 +59,9 @@ class Fixnum remove_method :/ alias / quo - def_canon *(instance_methods - Object.methods - [:canon]) + def_canon(*(instance_methods - Object.methods - [:canon])) - alias power! ** + alias power! ** unless defined?(0.power!) def ** (other) if self < 0 && other.round != other @@ -77,9 +77,9 @@ class Bignum remove_method :/ alias / quo - def_canon *(instance_methods - Object.methods - [:canon]) + def_canon(*(instance_methods - Object.methods - [:canon])) - alias power! ** + alias power! ** unless defined?(0.power!) def ** (other) if self < 0 && other.round != other @@ -104,7 +104,7 @@ class Rational def convert(*args) convert_orig(*args).__send__(:canon) end end - def_canon *(instance_methods - Object.methods - [:canon]) + def_canon(*(instance_methods - Object.methods - [:canon])) alias power! ** @@ -257,7 +257,7 @@ class Complex def convert(*args) convert_orig(*args).__send__(:canon) end end - def_canon *(instance_methods - Object.methods - [:canon]) + def_canon(*(instance_methods - Object.methods - [:canon])) end @@ -281,7 +281,7 @@ end class Float - def_canon *(instance_methods - Object.methods - [:canon]) + def_canon(*(instance_methods - Object.methods - [:canon])) alias power! ** |