summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-15 13:21:21 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-15 13:21:21 (GMT)
commit800c7af73ccae7ef862674f682d1d82ba2149379 (patch)
treed29e91e7b1410f35d448edfe968fafe812a3e9a4 /vm_method.c
parentf3db73f107d035d76d455829cb9968999a8ef32d (diff)
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
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/vm_method.c b/vm_method.c
index d551332..3095ac2 100644
--- a/vm_method.c
+++ b/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) &&
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);