summaryrefslogtreecommitdiffstats
path: root/lib/rational.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-17 08:58:16 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-17 08:58:16 +0000
commite740a1ddeeaa7dc357b7b3e1985e24d4d26670cc (patch)
treeba14446d98584b2cf10d00c74cc444e2ccb74692 /lib/rational.rb
parent9cf6076147b15018b037eca51c62bd86f7294098 (diff)
downloadruby-e740a1ddeeaa7dc357b7b3e1985e24d4d26670cc.tar.gz
ruby-e740a1ddeeaa7dc357b7b3e1985e24d4d26670cc.tar.xz
ruby-e740a1ddeeaa7dc357b7b3e1985e24d4d26670cc.zip
* eval.c (rb_clear_cache_by_class): check both klass and origin.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rational.rb')
-rw-r--r--lib/rational.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/rational.rb b/lib/rational.rb
index e0a364246..38af7b8a8 100644
--- a/lib/rational.rb
+++ b/lib/rational.rb
@@ -329,10 +329,6 @@ class Integer
end
class Fixnum
- unless defined? Complex
- alias power! **;
- end
-
undef quo
def quo(other)
Rational.new!(self,1) / other
@@ -346,8 +342,9 @@ class Fixnum
Rational.new!(self,1)**other
end
end
-
- unless defined? Complex
+
+ unless defined? 1.power!
+ alias power! **
alias ** rpower
end
end