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

ruby-changes:17569

From: yugui <ko1@a...>
Date: Sat, 23 Oct 2010 22:38:59 +0900 (JST)
Subject: [ruby-changes:17569] Ruby:r29574 (ruby_1_9_2): merges r29155 from trunk into ruby_1_9_2. fixes #3777, #3772 and #3722.

yugui	2010-10-23 22:38:37 +0900 (Sat, 23 Oct 2010)

  New Revision: 29574

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

  Log:
    merges r29155 from trunk into ruby_1_9_2. fixes #3777, #3772 and #3722.
    --
    * thread.c (ruby_suppress_tracing): restore the state and invoke
      the func with normal state.  a patch from Satoshi Shiba <shiba
      AT rvm.jp> at [ruby-dev:42162].  [ruby-core:31783]

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/test/ruby/test_trace.rb
    branches/ruby_1_9_2/thread.c
    branches/ruby_1_9_2/version.h

Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 29573)
+++ ruby_1_9_2/ChangeLog	(revision 29574)
@@ -1,3 +1,9 @@
+Wed Sep  1 12:56:36 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* thread.c (ruby_suppress_tracing): restore the state and invoke
+	  the func with normal state.  a patch from Satoshi Shiba <shiba
+	  AT rvm.jp> at [ruby-dev:42162].  [ruby-core:31783]
+
 Tue Aug 31 17:32:34 2010  Hidetoshi NAGAI  <nagai@a...>
 
 	* ext/tk/stubs.c: fix [Bug #3771] "VC++ can't make ext/tk with enabling
Index: ruby_1_9_2/thread.c
===================================================================
--- ruby_1_9_2/thread.c	(revision 29573)
+++ ruby_1_9_2/thread.c	(revision 29574)
@@ -4090,6 +4090,7 @@
     rb_thread_t *th = GET_THREAD();
     int state, tracing;
     volatile int raised;
+    volatile int outer_state;
     VALUE result = Qnil;
 
     if ((tracing = th->tracing) != 0 && !always) {
@@ -4100,6 +4101,8 @@
     }
 
     raised = rb_threadptr_reset_raised(th);
+    outer_state = th->state;
+    th->state = 0;
 
     PUSH_TAG();
     if ((state = EXEC_TAG()) == 0) {
@@ -4115,6 +4118,7 @@
     if (state) {
 	JUMP_TAG(state);
     }
+    th->state = outer_state;
 
     return result;
 }
Index: ruby_1_9_2/version.h
===================================================================
--- ruby_1_9_2/version.h	(revision 29573)
+++ ruby_1_9_2/version.h	(revision 29574)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.2"
-#define RUBY_PATCHLEVEL 27
+#define RUBY_PATCHLEVEL 28
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1
Index: ruby_1_9_2/test/ruby/test_trace.rb
===================================================================
--- ruby_1_9_2/test/ruby/test_trace.rb	(revision 29573)
+++ ruby_1_9_2/test/ruby/test_trace.rb	(revision 29574)
@@ -46,4 +46,16 @@
   ensure
     untrace_var :$x
   end
+
+  def test_trace_break
+    bug2722 = '[ruby-core:31783]'
+    a = Object.new.extend(Enumerable)
+    def a.each
+      yield
+    end
+    assert(Thread.start {
+             Thread.current.add_trace_func(proc{})
+             a.any? {true}
+           }.value, bug2722)
+  end
 end

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

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