summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-19 04:41:19 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-19 04:41:19 +0000
commitd31e1d4a52fc17c0cd8848eedd6e0934f5ea5291 (patch)
treedd3e6c0370f6f818080243a0c9fb64deebf2e115
parent9b520ddcec94c4654ca36bbb404bf4e9569b70cc (diff)
* 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/trunk@21661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ruby.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2716683d763..64884caa410 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jan 19 13:34:25 2009 Koichi Sasada <ko1@atdot.net>
+
+ * ruby.c (require_libraries): reset th->parse_in_eval while
+ loading libraries. fixes [ruby-dev:37780]
+
Mon Jan 19 11:46:39 2009 Koichi Sasada <ko1@atdot.net>
* vm_eval.c, eval.c (rb_f_block_given_p): move definition of
diff --git a/ruby.c b/ruby.c
index 7ffdc5a2775..a0d362b41f9 100644
--- a/ruby.c
+++ b/ruby.c
@@ -458,7 +458,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");
@@ -467,6 +469,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;
}