summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-07 11:55:17 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-07 11:55:17 +0000
commit4722c20661093f5071701941bc2f7b519f2a7283 (patch)
tree05983de24d5a5120805188e191f5c9113a4df0ac /eval.c
parent04fd9aceab50c0ca97e96a8e183a948a903ed56e (diff)
* eval.c (Init_eval): main.include should be private.
[ruby-core:51293] [Bug #7670] * test/ruby/test_module.rb (test_top_include_is_private): a new test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index ea78edc66a..2c24474d3f 100644
--- a/eval.c
+++ b/eval.c
@@ -1551,7 +1551,8 @@ Init_eval(void)
rb_define_singleton_method(rb_cModule, "nesting", rb_mod_nesting, 0);
rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, -1);
- rb_define_singleton_method(rb_vm_top_self(), "include", top_include, -1);
+ rb_define_private_method(rb_singleton_class(rb_vm_top_self()),
+ "include", top_include, -1);
rb_define_private_method(rb_singleton_class(rb_vm_top_self()),
"using", top_using, 1);