summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-20 09:52:51 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-20 09:52:51 +0000
commit6106439984f574cbe1babdbed8df2e7c77fab023 (patch)
tree4d39d8f4646c34744a2f7dfb19ea239e788c4d97 /ruby.c
parent9b6c8a5b6484a7904f03ac245ce76fcb1f53916c (diff)
merges r21661 from trunk into ruby_1_9_1.
* ruby.c (require_libraries): reset th->parse_in_eval while loading libraries. fixes [ruby-dev:37780] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index 03daaf5c6f..e974757753 100644
--- a/ruby.c
+++ b/ruby.c
@@ -455,7 +455,9 @@ require_libraries(struct cmdline_options *opt)
ID require;
rb_thread_t *th = GET_THREAD();
rb_block_t *prev_base_block = th->base_block;
+ int prev_parse_in_eval = th->parse_in_eval;
th->base_block = 0;
+ th->parse_in_eval = 0;
Init_ext(); /* should be called here for some reason :-( */
CONST_ID(require, "require");
@@ -464,6 +466,8 @@ require_libraries(struct cmdline_options *opt)
rb_funcall2(rb_vm_top_self(), require, 1, &feature);
}
opt->req_list = 0;
+
+ th->parse_in_eval = prev_parse_in_eval;
th->base_block = prev_base_block;
}