1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

vm_method.c: separate ID selection

* vm_method.c (rb_method_entry_make): separate selection of IDs to
  be private from condition of method to be defined.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-06-15 13:21:21 +00:00
parent f3db73f107
commit 800c7af73c

View file

@ -261,11 +261,15 @@ rb_method_entry_make(VALUE klass, ID mid, rb_method_type_t type,
}
if (!FL_TEST(klass, FL_SINGLETON) &&
type != VM_METHOD_TYPE_NOTIMPLEMENTED &&
type != VM_METHOD_TYPE_ZSUPER &&
(mid == idInitialize || mid == idInitialize_copy ||
mid == idInitialize_clone || mid == idInitialize_dup ||
mid == idRespond_to_missing)) {
noex = NOEX_PRIVATE | noex;
type != VM_METHOD_TYPE_ZSUPER) {
switch (mid) {
case idInitialize:
case idInitialize_copy:
case idInitialize_clone:
case idInitialize_dup:
case idRespond_to_missing:
noex |= NOEX_PRIVATE;
}
}
rb_check_frozen(klass);