diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-17 08:58:16 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-17 08:58:16 +0000 |
commit | 8cee72d5c6184e8ea1680b79390e869ea231ac01 (patch) | |
tree | ba14446d98584b2cf10d00c74cc444e2ccb74692 /lib/complex.rb | |
parent | 9a27cf9499be318b478346959c6d3b571653bcc9 (diff) | |
download | bundler-8cee72d5c6184e8ea1680b79390e869ea231ac01.tar.gz |
* eval.c (rb_clear_cache_by_class): check both klass and origin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/complex.rb')
-rw-r--r-- | lib/complex.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/complex.rb b/lib/complex.rb index 6b3e42f4e2..53d0f5e0bb 100644 --- a/lib/complex.rb +++ b/lib/complex.rb @@ -411,19 +411,18 @@ end class Fixnum - alias power! ** - + unless defined? 1.power! + alias power! ** + p [__FILE__, defined? 1.power!] + end + # Redefined to handle a Complex argument. def ** (other) if self < 0 Complex.new!(self, 0) ** other else - if defined? Rational - if other >= 0 - self.power!(other) - else - Rational.new!(self,1)**other - end + if defined? self.rpower + self.rpower(other) else self.power!(other) end @@ -597,7 +596,6 @@ module Math end - # Documentation comments: # - source: original (researched from pickaxe) # - a couple of fixme's |