kernel.c: simplify mrb_inspect_recursive_p using new recursion detection

Replace custom inspect_recursive_p implementation with the new
generalized mrb_recursive_method_p for better code reuse and
consistency.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-07-07 13:36:36 +09:00
parent 419c8ebfb2
commit b64fc03182
+1 -1
View File
@@ -141,7 +141,7 @@ mrb_recursive_method_p(mrb_state *mrb, mrb_sym mid, mrb_value obj1, mrb_value ob
mrb_bool
mrb_inspect_recursive_p(mrb_state *mrb, mrb_value obj)
{
return inspect_recursive_p(mrb, obj, 0);
return MRB_RECURSIVE_UNARY_P(mrb, MRB_SYM(inspect), obj);
}
static mrb_value