mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (rb_mod_define_method): set implicit visibility only when
it's called for the target class (ruby_cbase). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
10ec337f53
commit
61634cee5f
2 changed files with 13 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Nov 23 10:38:40 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_mod_define_method): set implicit visibility only when
|
||||
it's called for the target class (ruby_cbase).
|
||||
|
||||
Wed Nov 22 16:00:49 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ext/tk/extconf.rb: support --with-X11/--without-X11 option.
|
||||
|
|
16
eval.c
16
eval.c
|
@ -9552,14 +9552,14 @@ rb_mod_define_method(argc, argv, mod)
|
|||
rb_raise(rb_eTypeError, "wrong argument type (expected Proc/Method)");
|
||||
}
|
||||
|
||||
if (SCOPE_TEST(SCOPE_PRIVATE)) {
|
||||
noex = NOEX_PRIVATE;
|
||||
}
|
||||
else if (SCOPE_TEST(SCOPE_PROTECTED)) {
|
||||
noex = NOEX_PROTECTED;
|
||||
}
|
||||
else {
|
||||
noex = NOEX_PUBLIC;
|
||||
noex = NOEX_PUBLIC;
|
||||
if (ruby_cbase == mod) {
|
||||
if (SCOPE_TEST(SCOPE_PRIVATE)) {
|
||||
noex = NOEX_PRIVATE;
|
||||
}
|
||||
else if (SCOPE_TEST(SCOPE_PROTECTED)) {
|
||||
noex = NOEX_PROTECTED;
|
||||
}
|
||||
}
|
||||
rb_add_method(mod, id, node, noex);
|
||||
return body;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue