ruby-changes:43582
From: ko1 <ko1@a...>
Date: Wed, 13 Jul 2016 14:19:16 +0900 (JST)
Subject: [ruby-changes:43582] ko1:r55655 (trunk): * vm_method.c (method_entry_get_without_cache): check
ko1 2016-07-13 14:19:12 +0900 (Wed, 13 Jul 2016) New Revision: 55655 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55655 Log: * 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. Modified files: trunk/ChangeLog trunk/vm_method.c Index: ChangeLog =================================================================== --- ChangeLog (revision 55654) +++ ChangeLog (revision 55655) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Jul 13 14:16:03 2016 Koichi Sasada <ko1@a...> + + * 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. + Wed Jul 13 14:15:22 2016 Martin Duerst <duerst@i...> * enc/windows_1254.c: Adjust variable/macro names. Index: vm_method.c =================================================================== --- vm_method.c (revision 55654) +++ vm_method.c (revision 55655) @@ -733,17 +733,19 @@ method_entry_get_without_cache(VALUE kla https://github.com/ruby/ruby/blob/trunk/vm_method.c#L733 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/