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

ruby-changes:35198

From: hsbt <ko1@a...>
Date: Tue, 26 Aug 2014 09:25:46 +0900 (JST)
Subject: [ruby-changes:35198] hsbt:r47280 (trunk): * lib/mathn.rb: removed commented-out code.

hsbt	2014-08-26 09:25:27 +0900 (Tue, 26 Aug 2014)

  New Revision: 47280

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

  Log:
    * lib/mathn.rb: removed commented-out code.

  Modified files:
    trunk/ChangeLog
    trunk/lib/mathn.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47279)
+++ ChangeLog	(revision 47280)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Aug 26 09:25:03 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
+
+	* lib/mathn.rb: removed commented-out code.
+
 Mon Aug 25 20:15:50 2014  Masaki Suketa <masaki.suketa@n...>
 
 	* ext/win32ole/win32ole.c(fole_s_connect, fole_initialize): raise a
Index: lib/mathn.rb
===================================================================
--- lib/mathn.rb	(revision 47279)
+++ lib/mathn.rb	(revision 47280)
@@ -226,14 +226,8 @@ module Math https://github.com/ruby/ruby/blob/trunk/lib/mathn.rb#L226
   def sqrt(a)
     if a.kind_of?(Complex)
       abs = sqrt(a.real*a.real + a.imag*a.imag)
-#      if not abs.kind_of?(Rational)
-#        return a**Rational(1,2)
-#      end
       x = sqrt((a.real + abs)/Rational(2))
       y = sqrt((-a.real + abs)/Rational(2))
-#      if !(x.kind_of?(Rational) and y.kind_of?(Rational))
-#        return a**Rational(1,2)
-#      end
       if a.imag >= 0
         Complex(x, y)
       else

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

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