summaryrefslogtreecommitdiff
path: root/proc.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 /proc.c
parent03246171cc1a506b5e03c9141337ef4f5a1f0856 (diff)
Use `UNDEF_P`
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proc.c b/proc.c
index 84409c09f9..34d2d4e71f 100644
--- a/proc.c
+++ b/proc.c
@@ -1690,7 +1690,7 @@ mnew_internal(const rb_method_entry_t *me, VALUE klass, VALUE iclass,
method = TypedData_Make_Struct(mclass, struct METHOD, &method_data_type, data);
- if (obj == Qundef) {
+ if (UNDEF_P(obj)) {
RB_OBJ_WRITE(method, &data->recv, Qundef);
RB_OBJ_WRITE(method, &data->klass, Qundef);
}
@@ -3126,7 +3126,7 @@ method_inspect(VALUE method)
defined_class = RBASIC_CLASS(defined_class);
}
- if (data->recv == Qundef) {
+ if (UNDEF_P(data->recv)) {
// UnboundMethod
rb_str_buf_append(str, rb_inspect(defined_class));
}