[前][次][番号順一覧][スレッド一覧]

ruby-changes:13304

From: marcandre <ko1@a...>
Date: Thu, 24 Sep 2009 09:42:43 +0900 (JST)
Subject: [ruby-changes:13304] Ruby:r25067 (trunk): * lib/mathn.rb (Bignum#**): Fixed bignum**fixnum that was broken when requiring lib/mathn

marcandre	2009-09-24 09:42:23 +0900 (Thu, 24 Sep 2009)

  New Revision: 25067

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25067

  Log:
    * lib/mathn.rb (Bignum#**): Fixed bignum**fixnum that was broken when requiring lib/mathn
      [ruby-core:25740]

  Modified files:
    trunk/ChangeLog
    trunk/lib/mathn.rb
    trunk/lib/rational.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 25066)
+++ ChangeLog	(revision 25067)
@@ -1,3 +1,9 @@
+Thu Sep 24 09:41:42 2009  Marc-Andre Lafortune  <ruby-core@m...>
+
+	* 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  <nobu@r...>
 
 	* ext/bigdecimal/lib/bigdecimal/math.rb (atan): atan(Infinity) is
Index: lib/rational.rb
===================================================================
--- lib/rational.rb	(revision 25066)
+++ lib/rational.rb	(revision 25067)
@@ -7,7 +7,7 @@
   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 @@
   alias quof fdiv
   alias rdiv quo
 
-  alias power! ** unless defined?(0.power!)
+  alias power! ** unless method_defined? :power!
   alias rpower **
 
 end
Index: lib/mathn.rb
===================================================================
--- lib/mathn.rb	(revision 25066)
+++ lib/mathn.rb	(revision 25067)
@@ -25,7 +25,7 @@
   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 @@
   remove_method :/
   alias / quo
 
-  alias power! ** unless defined?(0.power!)
+  alias power! ** unless method_defined? :power!
 
   def ** (other)
     if self < 0 && other.round != other

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]