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

ruby-changes:13693

From: yugui <ko1@a...>
Date: Sun, 25 Oct 2009 23:47:05 +0900 (JST)
Subject: [ruby-changes:13693] Ruby:r25480 (ruby_1_9_1): merges r24530 from trunk into ruby_1_9_1.

yugui	2009-10-25 23:46:36 +0900 (Sun, 25 Oct 2009)

  New Revision: 25480

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

  Log:
    merges r24530 from trunk into ruby_1_9_1.
    --
    * vm.c (vm_exec): returning from lambda runs ensure section.
      [Bug #1729]

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/version.h
    branches/ruby_1_9_1/vm.c

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 25479)
+++ ruby_1_9_1/ChangeLog	(revision 25480)
@@ -1,3 +1,8 @@
+Thu Aug 13 21:01:03 2009  wanabe  <s.wanabe@g...>
+
+	* vm.c (vm_exec): returning from lambda runs ensure section.
+	  [Bug #1729]
+
 Wed Aug 12 15:52:04 2009  NARUSE, Yui  <naruse@r...>
 
 	* class.c (rb_define_module_id_under): fix the name.
Index: ruby_1_9_1/vm.c
===================================================================
--- ruby_1_9_1/vm.c	(revision 25479)
+++ ruby_1_9_1/vm.c	(revision 25480)
@@ -1114,10 +1114,23 @@
 			SET_THROWOBJ_STATE(err, state = TAG_BREAK);
 		    }
 		    else {
-			result = GET_THROWOBJ_VAL(err);
-			th->errinfo = Qnil;
-			th->cfp += 2;
-			goto finish_vme;
+			for (i = 0; i < cfp->iseq->catch_table_size; i++) {
+			    entry = &cfp->iseq->catch_table[i];
+			    if (entry->start < epc && entry->end >= epc) {
+				if (entry->type == CATCH_TYPE_ENSURE) {
+				    catch_iseqval = entry->iseq;
+				    cont_pc = entry->cont;
+				    cont_sp = entry->sp;
+				    break;
+				}
+			    }
+			}
+			if (!catch_iseqval) {
+			    result = GET_THROWOBJ_VAL(err);
+			    th->errinfo = Qnil;
+			    th->cfp += 2;
+			    goto finish_vme;
+			}
 		    }
 		    /* through */
 		}
Index: ruby_1_9_1/version.h
===================================================================
--- ruby_1_9_1/version.h	(revision 25479)
+++ ruby_1_9_1/version.h	(revision 25480)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.1"
-#define RUBY_PATCHLEVEL 286
+#define RUBY_PATCHLEVEL 287
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1

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

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