aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/eval.c b/eval.c
index 25a15b3c30..a66f710a8a 100644
--- a/eval.c
+++ b/eval.c
@@ -7222,12 +7222,10 @@ top_include(argc, argv, self)
{
rb_secure(4);
if (ruby_wrapper) {
- rb_warn("main#include in the wrapped load is effective only for toplevel");
- return rb_obj_extend(argc, argv, self);
- }
- else {
- return rb_mod_include(argc, argv, rb_cObject);
+ rb_warning("main#include in the wrapped load is effective only in wrapper module");
+ return rb_mod_include(argc, argv, ruby_wrapper);
}
+ return rb_mod_include(argc, argv, rb_cObject);
}
VALUE rb_f_trace_var();