aboutsummaryrefslogtreecommitdiffstats
path: root/vm_method.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/vm_method.c b/vm_method.c
index b85351a671..4b747e9d52 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -814,10 +814,9 @@ rb_alias(VALUE klass, ID name, ID def)
if (!orig_me || orig_me->type == VM_METHOD_TYPE_UNDEF) {
if (TYPE(klass) == T_MODULE) {
orig_me = search_method(rb_cObject, def);
-
- if (!orig_me || !orig_me->type == VM_METHOD_TYPE_UNDEF) {
- rb_print_undef(klass, def, 0);
- }
+ }
+ if (!orig_me || !orig_me->type == VM_METHOD_TYPE_UNDEF) {
+ rb_print_undef(klass, def, 0);
}
}
if (FL_TEST(klass, FL_SINGLETON)) {