diff options
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/vm_method.c b/vm_method.c index af7c99a95f..f344355f4f 100644 --- a/vm_method.c +++ b/vm_method.c @@ -653,9 +653,7 @@ rb_undef(VALUE klass, ID id) if (FL_TEST(c, FL_SINGLETON)) { VALUE obj = rb_ivar_get(klass, attached); - switch (TYPE(obj)) { - case T_MODULE: - case T_CLASS: + if (RB_TYPE_P(obj, T_MODULE) || RB_TYPE_P(obj, T_CLASS)) { c = obj; s0 = ""; } |