diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-13 05:19:12 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-13 05:19:12 +0000 |
commit | bebb62e01b6d752756c8cb51794119c490cde77c (patch) | |
tree | 78d647f2b13e54ecb2eef5546ff1bae851b5f263 /vm_method.c | |
parent | c5682ac4904e5a98d8121e88c8e48426b422666c (diff) | |
download | ruby-bebb62e01b6d752756c8cb51794119c490cde77c.tar.gz |
* vm_method.c (method_entry_get_without_cache): check
undefined method even if ruby_running is FALSE.
We haven't call "undef"ed methods before ruby_running.
So that this issue does not make troubles.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 8 |
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; |