[前][次][番号順一覧][スレッド一覧]

ruby-changes:10118

From: ko1 <ko1@a...>
Date: Mon, 19 Jan 2009 13:41:37 +0900 (JST)
Subject: [ruby-changes:10118] Ruby:r21661 (trunk): * ruby.c (require_libraries): reset th->parse_in_eval while

ko1	2009-01-19 13:41:19 +0900 (Mon, 19 Jan 2009)

  New Revision: 21661

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21661

  Log:
    * ruby.c (require_libraries): reset th->parse_in_eval while
      loading libraries.  fixes [ruby-dev:37780]

  Modified files:
    trunk/ChangeLog
    trunk/ruby.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21660)
+++ ChangeLog	(revision 21661)
@@ -1,3 +1,8 @@
+Mon Jan 19 13:34:25 2009  Koichi Sasada  <ko1@a...>
+
+	* 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@a...>
 
 	* vm_eval.c, eval.c (rb_f_block_given_p): move definition of
Index: ruby.c
===================================================================
--- ruby.c	(revision 21660)
+++ ruby.c	(revision 21661)
@@ -458,7 +458,9 @@
     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 @@
 	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;
 }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]