mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
c0e2f9278e
commit
f35b09c108
1 changed files with 7 additions and 5 deletions
12
vm_method.c
12
vm_method.c
|
@ -1892,11 +1892,13 @@ Init_eval_method(void)
|
||||||
"private", top_private, -1);
|
"private", top_private, -1);
|
||||||
|
|
||||||
{
|
{
|
||||||
#define REPLICATE_METHOD(klass, id, visi) \
|
#define REPLICATE_METHOD(klass, id) do { \
|
||||||
rb_method_entry_set((klass), (id), rb_method_entry((klass), (id), 0), (visi));
|
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, idMethodMissing);
|
||||||
REPLICATE_METHOD(rb_eException, idRespond_to, METHOD_VISI_PUBLIC);
|
REPLICATE_METHOD(rb_eException, idRespond_to);
|
||||||
REPLICATE_METHOD(rb_eException, idRespond_to_missing, METHOD_VISI_PUBLIC);
|
REPLICATE_METHOD(rb_eException, idRespond_to_missing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue