mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
initialize made private
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@44 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6e8189235c
commit
8189c8146b
5 changed files with 23 additions and 15 deletions
5
eval.c
5
eval.c
|
@ -2117,7 +2117,7 @@ rb_eval(self, node)
|
|||
rb_clear_cache_by_id(node->nd_mid);
|
||||
}
|
||||
|
||||
if (FL_TEST(the_scope,SCOPE_PRIVATE)) {
|
||||
if (FL_TEST(the_scope,SCOPE_PRIVATE) || node->nd_mid == init) {
|
||||
noex = NOEX_PRIVATE;
|
||||
}
|
||||
else {
|
||||
|
@ -2127,9 +2127,6 @@ rb_eval(self, node)
|
|||
if (FL_TEST(the_scope,SCOPE_MODFUNC)) {
|
||||
rb_add_method(rb_singleton_class(the_class),
|
||||
node->nd_mid, node->nd_defn, NOEX_PUBLIC);
|
||||
}
|
||||
|
||||
if (FL_TEST(the_scope, SCOPE_MODFUNC)) {
|
||||
rb_funcall(the_class, rb_intern("singleton_method_added"),
|
||||
1, INT2FIX(node->nd_mid));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue