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

ruby-changes:6054

From: mame <ko1@a...>
Date: Tue, 24 Jun 2008 22:17:04 +0900 (JST)
Subject: [ruby-changes:6054] Ruby:r17564 (trunk): * vm_eval.c (eval_string_with_cref): preserve parse_in_eval even if

mame	2008-06-24 22:16:44 +0900 (Tue, 24 Jun 2008)

  New Revision: 17564

  Modified files:
    trunk/ChangeLog
    trunk/vm_eval.c

  Log:
    * vm_eval.c (eval_string_with_cref): preserve parse_in_eval even if
      exception raised.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17564&r2=17563&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/vm_eval.c?r1=17564&r2=17563&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 17563)
+++ ChangeLog	(revision 17564)
@@ -1,3 +1,8 @@
+Tue Jun 24 22:14:36 2008  Yusuke Endoh  <mame@t...>
+
+	* vm_eval.c (eval_string_with_cref): preserve parse_in_eval even if
+	  exception raised.
+
 Tue Jun 24 22:09:18 2008  Masaki Suketa  <masaki.suketa@n...>
 
 	* ext/win32ole/win32ole.c(ole_invoke): fix memory leak.
Index: vm_eval.c
===================================================================
--- vm_eval.c	(revision 17563)
+++ vm_eval.c	(revision 17564)
@@ -664,12 +664,14 @@
     rb_thread_t *th = GET_THREAD();
     rb_env_t *env = NULL;
     rb_block_t block;
+    volatile int parse_in_eval;
 
     if (file == 0) {
 	file = rb_sourcefile();
 	line = rb_sourceline();
     }
 
+    parse_in_eval = th->parse_in_eval;
     PUSH_TAG();
     if ((state = EXEC_TAG()) == 0) {
 	rb_iseq_t *iseq;
@@ -726,6 +728,7 @@
 	result = vm_eval_body(th);
     }
     POP_TAG();
+    th->parse_in_eval = parse_in_eval;
 
     if (state) {
 	if (state == TAG_RAISE) {

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

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