rational.rb:351 でFixnum#**の実体をFixnum#rpowerにし、
rational.rb:344 で、Fixnum#rpower内でFixnum#power!を呼び、
complex.rb:414  でFixnum#power!の実体をFixnum#**にして
います。

rational.rbではpower!の再aliasを防止していますが、complex.rbではしていな
いので、rational.rbをcomplex.rbより先にrequireするとpower!の再帰が止まら
ずにスタックが溢れるようです。

Bignum#power!も同様です。


ruby -v
=> ruby 1.8.0 (2003-06-23) [i386-cygwin]

ruby -rrational -rcomplex -e '1**1'
=> /usr/local/lib/ruby/1.8/rational.rb:343:in `power!': stack level too deep (Syste
mStackError)
        from /usr/local/lib/ruby/1.8/rational.rb:344:in `power!'
        from /usr/local/lib/ruby/1.8/rational.rb:344:in `power!'
        from /usr/local/lib/ruby/1.8/rational.rb:344:in `power!'
        from /usr/local/lib/ruby/1.8/rational.rb:344:in `power!'
        from /usr/local/lib/ruby/1.8/rational.rb:344:in `power!'
        from /usr/local/lib/ruby/1.8/rational.rb:344:in `power!'
        from /usr/local/lib/ruby/1.8/rational.rb:344:in `power!'
        from /usr/local/lib/ruby/1.8/rational.rb:344:in `power!'
         ... 15605 levels...
        from /usr/local/lib/ruby/1.8/rational.rb:344:in `power!'
        from /usr/local/lib/ruby/1.8/rational.rb:344:in `power!'
        from /usr/local/lib/ruby/1.8/complex.orig.rb:423:in `**'
        from -e:1


-------------------------------------------------------------------------------

--- complex.orig.rb	2003-07-11 18:43:46.000000000 +0900
+++ complex.rb	2003-07-11 18:45:42.000000000 +0900
@@ -411,7 +411,9 @@
 
 
 class Fixnum
-  alias power! **
+  unless defined? Rational
+    alias power! **
+  end
   
   # Redefined to handle a Complex argument.
   def ** (other)
@@ -432,7 +434,9 @@
 end
 
 class Bignum
-  alias power! **
+  unless defined? Rational
+    alias power! **
+  end
 end
 
 class Float



  #########################################################
 #      園田裕貴
#       pastor / fmc.rikkyo.ne.jp
 #      http://rkmath00.hp.infoseek.co.jp/
  #########################################################