summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-01-30 14:48:59 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2024-01-30 14:48:59 +0900
commit361b3efe164bd753258c7a86aff5141f1fd3ecf6 (patch)
tree1db3c279926bddcc6310e26413997c583d594a60 /complex.c
parent03246171cc1a506b5e03c9141337ef4f5a1f0856 (diff)
Use `UNDEF_P`
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/complex.c b/complex.c
index 943d9e4121..dc12ac8b1b 100644
--- a/complex.c
+++ b/complex.c
@@ -1067,7 +1067,7 @@ complex_pow_for_special_angle(VALUE self, VALUE other)
dir = 3;
}
- if (x == Qundef) return x;
+ if (UNDEF_P(x)) return x;
if (f_negative_p(x)) {
x = f_negate(x);
@@ -1139,7 +1139,7 @@ rb_complex_pow(VALUE self, VALUE other)
}
VALUE result = complex_pow_for_special_angle(self, other);
- if (result != Qundef) return result;
+ if (!UNDEF_P(result)) return result;
if (RB_TYPE_P(other, T_COMPLEX)) {
VALUE r, theta, nr, ntheta;