summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-21 12:32:33 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-21 12:32:33 +0000
commit83b381752e21f15eb224bcf53142a3c8eaede1dc (patch)
treed9b9267ed0772d16788381905b6a5aa055f458ac /complex.c
parentcbae6d09113ff3ff6c07af2ae341b7384fa97667 (diff)
fixed previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c8
1 files 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));