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

ruby-changes:7926

From: tadf <ko1@a...>
Date: Sun, 21 Sep 2008 21:32:46 +0900 (JST)
Subject: [ruby-changes:7926] Ruby:r19447 (trunk): fixed previous commit.

tadf	2008-09-21 21:32:33 +0900 (Sun, 21 Sep 2008)

  New Revision: 19447

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

  Log:
    fixed previous commit.

  Modified files:
    trunk/complex.c

Index: complex.c
===================================================================
--- complex.c	(revision 19446)
+++ complex.c	(revision 19447)
@@ -692,7 +692,7 @@
 	    z = x;
 	    n = f_sub(other, ONE);
 
-	    while (!f_zero_p(n)) {
+	    while (f_nonzero_p(n)) {
 		VALUE a;
 
 		while (a = f_divmod(n, TWO),
@@ -994,7 +994,7 @@
 {
     get_dat1(self);
 
-    if (k_inexact_p(dat->imag) || !f_zero_p(dat->imag)) {
+    if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) {
 	VALUE s = f_to_s(self);
 	rb_raise(rb_eRangeError, "can't convert %s into Integer",
 		 StringValuePtr(s));
@@ -1007,7 +1007,7 @@
 {
     get_dat1(self);
 
-    if (k_inexact_p(dat->imag) || !f_zero_p(dat->imag)) {
+    if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) {
 	VALUE s = f_to_s(self);
 	rb_raise(rb_eRangeError, "can't convert %s into Float",
 		 StringValuePtr(s));
@@ -1020,7 +1020,7 @@
 {
     get_dat1(self);
 
-    if (k_inexact_p(dat->imag) || !f_zero_p(dat->imag)) {
+    if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) {
 	VALUE s = f_to_s(self);
 	rb_raise(rb_eRangeError, "can't convert %s into Rational",
 		 StringValuePtr(s));

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

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