1
0
Fork 0
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:
nobu 2015-07-01 08:17:58 +00:00
parent c0e2f9278e
commit f35b09c108

View file

@ -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);
}
}