ruby-changes:3377
From: ko1@a...
Date: 3 Jan 2008 20:27:03 +0900
Subject: [ruby-changes:3377] ko1 - Ruby:r14870 (trunk): * eval_jump.c (rb_f_catch): Resotre cfp if catched thrown object.
ko1 2008-01-03 20:26:48 +0900 (Thu, 03 Jan 2008) New Revision: 14870 Modified files: trunk/ChangeLog trunk/eval_jump.c Log: * eval_jump.c (rb_f_catch): Resotre cfp if catched thrown object. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14870&r2=14869&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/eval_jump.c?r1=14870&r2=14869&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 14869) +++ ChangeLog (revision 14870) @@ -1,3 +1,7 @@ +Thu Jan 3 20:24:48 2008 Koichi Sasada <ko1@a...> + + * eval_jump.c (rb_f_catch): Resotre cfp if catched thrown object. + Thu Jan 3 19:45:57 2008 Koichi Sasada <ko1@a...> * bootstraptest/test_eval.rb, test_knownbug.rb: move a fixed test. Index: eval_jump.c =================================================================== --- eval_jump.c (revision 14869) +++ eval_jump.c (revision 14870) @@ -105,6 +105,7 @@ int state; VALUE val = Qnil; /* OK */ rb_thread_t *th = GET_THREAD(); + rb_control_frame_t *saved_cfp = th->cfp; rb_scan_args(argc, argv, "01", &tag); if (argc == 0) { @@ -118,6 +119,7 @@ val = rb_yield_0(1, &tag); } else if (state == TAG_THROW && RNODE(th->errinfo)->u1.value == tag) { + th->cfp = saved_cfp; val = th->tag->retval; th->errinfo = Qnil; state = 0; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml