aboutsummaryrefslogtreecommitdiffstats
path: root/vm_method.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/vm_method.c b/vm_method.c
index 96fc4b6855..69f98c4421 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -733,17 +733,19 @@ method_entry_get_without_cache(VALUE klass, ID id,
ent->mid = id;
if (UNDEFINED_METHOD_ENTRY_P(me)) {
- ent->me = 0;
- me = 0;
+ me = ent->me = NULL;
}
else {
ent->me = me;
}
}
else if (UNDEFINED_METHOD_ENTRY_P(me)) {
- me = 0;
+ me = NULL;
}
}
+ else if (UNDEFINED_METHOD_ENTRY_P(me)) {
+ me = NULL;
+ }
if (defined_class_ptr)
*defined_class_ptr = defined_class;