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

ruby-changes:32575

From: nobu <ko1@a...>
Date: Sun, 19 Jan 2014 17:57:03 +0900 (JST)
Subject: [ruby-changes:32575] nobu:r44654 (trunk): tracepoint.c: disable tracepoint

nobu	2014-01-19 17:56:58 +0900 (Sun, 19 Jan 2014)

  New Revision: 44654

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

  Log:
    tracepoint.c: disable tracepoint
    
    * ext/-test-/tracepoint/tracepoint.c (tracepoint_track_objspace_events):
      ensure tracepoint disabled.  [ruby-dev:47901] [Bug #9426]

  Modified files:
    trunk/ext/-test-/tracepoint/tracepoint.c
Index: ext/-test-/tracepoint/tracepoint.c
===================================================================
--- ext/-test-/tracepoint/tracepoint.c	(revision 44653)
+++ ext/-test-/tracepoint/tracepoint.c	(revision 44654)
@@ -64,8 +64,7 @@ tracepoint_track_objspace_events(VALUE s https://github.com/ruby/ruby/blob/trunk/ext/-test-/tracepoint/tracepoint.c#L64
     VALUE result = rb_ary_new();
 
     rb_tracepoint_enable(tpval);
-    rb_yield(Qundef);
-    rb_tracepoint_disable(tpval);
+    rb_ensure(rb_yield, Qundef, rb_tracepoint_disable, tpval);
 
     rb_ary_push(result, SIZET2NUM(track.newobj_count));
     rb_ary_push(result, SIZET2NUM(track.free_count));

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

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