From 83b381752e21f15eb224bcf53142a3c8eaede1dc Mon Sep 17 00:00:00 2001 From: tadf Date: Sun, 21 Sep 2008 12:32:33 +0000 Subject: [PATCH] fixed previous commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- complex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/complex.c b/complex.c index 827d795857..78593bd155 100644 --- a/complex.c +++ b/complex.c @@ -692,7 +692,7 @@ nucomp_expt(VALUE self, VALUE other) 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 @@ nucomp_to_i(VALUE self) { 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 @@ nucomp_to_f(VALUE self) { 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 @@ nucomp_to_r(VALUE self) { 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));