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

ruby-changes:16723

From: mame <ko1@a...>
Date: Thu, 22 Jul 2010 21:31:49 +0900 (JST)
Subject: [ruby-changes:16723] Ruby:r28718 (ruby_1_9_2): merges r28698 from trunk into ruby_1_9_2.

mame	2010-07-22 21:31:27 +0900 (Thu, 22 Jul 2010)

  New Revision: 28718

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

  Log:
    merges r28698 from trunk into ruby_1_9_2.
    --
    * lib/cmath.rb (CMath#cbrt): cbrt should accept a negative real
      numbers.  [ruby-core:31234]

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/lib/cmath.rb

Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 28717)
+++ ruby_1_9_2/ChangeLog	(revision 28718)
@@ -1,3 +1,8 @@
+Wed Jul 21 12:39:15 2010  Yusuke Endoh  <mame@t...>
+
+	* lib/cmath.rb (CMath#cbrt): cbrt should accept a negative real
+	  numbers.  [ruby-core:31234]
+
 Thu Jul 15 21:43:35 2010  Yusuke Endoh  <mame@t...>
 
 	* numeric.c (fix_divide): must not use rb_rational_new1 for coercion
Index: ruby_1_9_2/lib/cmath.rb
===================================================================
--- ruby_1_9_2/lib/cmath.rb	(revision 28717)
+++ ruby_1_9_2/lib/cmath.rb	(revision 28718)
@@ -85,7 +85,7 @@
   end
 
   def cbrt(z)
-    if z.real? and z >= 0
+    if z.real?
       cbrt!(z)
     else
       Complex(z) ** (1.0/3)

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

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