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:
parent
f3db73f107
commit
800c7af73c
1 changed files with 9 additions and 5 deletions
14
vm_method.c
14
vm_method.c
|
@ -261,11 +261,15 @@ rb_method_entry_make(VALUE klass, ID mid, rb_method_type_t type,
|
||||||
}
|
}
|
||||||
if (!FL_TEST(klass, FL_SINGLETON) &&
|
if (!FL_TEST(klass, FL_SINGLETON) &&
|
||||||
type != VM_METHOD_TYPE_NOTIMPLEMENTED &&
|
type != VM_METHOD_TYPE_NOTIMPLEMENTED &&
|
||||||
type != VM_METHOD_TYPE_ZSUPER &&
|
type != VM_METHOD_TYPE_ZSUPER) {
|
||||||
(mid == idInitialize || mid == idInitialize_copy ||
|
switch (mid) {
|
||||||
mid == idInitialize_clone || mid == idInitialize_dup ||
|
case idInitialize:
|
||||||
mid == idRespond_to_missing)) {
|
case idInitialize_copy:
|
||||||
noex = NOEX_PRIVATE | noex;
|
case idInitialize_clone:
|
||||||
|
case idInitialize_dup:
|
||||||
|
case idRespond_to_missing:
|
||||||
|
noex |= NOEX_PRIVATE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rb_check_frozen(klass);
|
rb_check_frozen(klass);
|
||||||
|
|
Loading…
Reference in a new issue