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

ruby-changes:10413

From: yugui <ko1@a...>
Date: Mon, 2 Feb 2009 17:22:57 +0900 (JST)
Subject: [ruby-changes:10413] Ruby:r21959 (ruby_1_9_1): merges r21945 from trunk into ruby_1_9_1.

yugui	2009-02-02 17:07:39 +0900 (Mon, 02 Feb 2009)

  New Revision: 21959

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

  Log:
    merges r21945 from trunk into ruby_1_9_1.
    * complex.c (f_signbit): regard NaN as a positive value.
      [ruby-dev:37861].

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/complex.c

Index: ruby_1_9_1/complex.c
===================================================================
--- ruby_1_9_1/complex.c	(revision 21958)
+++ ruby_1_9_1/complex.c	(revision 21959)
@@ -894,8 +894,10 @@
 #else
       {
 	  char s[2];
+	  double f = RFLOAT_VALUE(x);
 
-	  (void)snprintf(s, sizeof s, "%.0f", RFLOAT_VALUE(x));
+	  if (isnan(f)) return Qfalse;
+	  (void)snprintf(s, sizeof s, "%.0f", f);
 	  return f_boolcast(s[0] == '-');
       }
 #endif
Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 21958)
+++ ruby_1_9_1/ChangeLog	(revision 21959)
@@ -1,3 +1,8 @@
+Mon Feb  2 12:41:52 2009  Shugo Maeda  <shugo@r...>
+
+	* complex.c (f_signbit): regard NaN as a positive value.
+	  [ruby-dev:37861].
+
 Mon Feb  2 06:51:36 2009  NAKAMURA Usaku  <usa@r...>
 
 	* encoding.c (rb_filesystem_encoding): Windows' filesystem encoding is

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

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