From 945e4262b5501273e824cf824cd223aa9f2e536d Mon Sep 17 00:00:00 2001 From: yugui Date: Tue, 20 Jan 2009 09:52:51 +0000 Subject: 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ruby.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 34f8e55c9..e707de393 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jan 19 13:34:25 2009 Koichi Sasada + + * ruby.c (require_libraries): reset th->parse_in_eval while + loading libraries. fixes [ruby-dev:37780] + Sat Jan 17 21:04:27 2009 Yuki Sonoda (Yugui) * lib/erb.rb: changes style of the rdoc for suppressing diff --git a/ruby.c b/ruby.c index 03daaf5c6..e97475775 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; } -- cgit