зеркало из https://github.com/github/ruby.git
vm_method.c: orignial visibilities
* vm_method.c (Init_eval_method): copy the orignial visibilities, instead of setting explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
c0e2f9278e
Коммит
f35b09c108
12
vm_method.c
12
vm_method.c
|
@ -1892,11 +1892,13 @@ Init_eval_method(void)
|
|||
"private", top_private, -1);
|
||||
|
||||
{
|
||||
#define REPLICATE_METHOD(klass, id, visi) \
|
||||
rb_method_entry_set((klass), (id), rb_method_entry((klass), (id), 0), (visi));
|
||||
#define REPLICATE_METHOD(klass, id) do { \
|
||||
const rb_method_entry_t *me = rb_method_entry((klass), (id), 0); \
|
||||
rb_method_entry_set((klass), (id), me, METHOD_ENTRY_VISI(me)); \
|
||||
} while (0)
|
||||
|
||||
REPLICATE_METHOD(rb_eException, idMethodMissing, METHOD_VISI_PRIVATE);
|
||||
REPLICATE_METHOD(rb_eException, idRespond_to, METHOD_VISI_PUBLIC);
|
||||
REPLICATE_METHOD(rb_eException, idRespond_to_missing, METHOD_VISI_PUBLIC);
|
||||
REPLICATE_METHOD(rb_eException, idMethodMissing);
|
||||
REPLICATE_METHOD(rb_eException, idRespond_to);
|
||||
REPLICATE_METHOD(rb_eException, idRespond_to_missing);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче