diff options
| author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-21 12:32:33 +0000 |
|---|---|---|
| committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-21 12:32:33 +0000 |
| commit | c2e74757693097692fee3127a3f6fb48cca5543b (patch) | |
| tree | d9b9267ed0772d16788381905b6a5aa055f458ac | |
| parent | 1376c3191b1bdf32b43b7b4bfef24ac5956941f5 (diff) | |
| download | ruby-c2e74757693097692fee3127a3f6fb48cca5543b.tar.gz ruby-c2e74757693097692fee3127a3f6fb48cca5543b.tar.xz ruby-c2e74757693097692fee3127a3f6fb48cca5543b.zip | |
fixed previous commit.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | complex.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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)); |
