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

ruby-changes:29267

From: nagachika <ko1@a...>
Date: Sun, 16 Jun 2013 01:14:45 +0900 (JST)
Subject: [ruby-changes:29267] nagachika:r41319 (ruby_2_0_0): merge revision(s) 41300: [Backport #8489]

nagachika	2013-06-16 01:14:32 +0900 (Sun, 16 Jun 2013)

  New Revision: 41319

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

  Log:
    merge revision(s) 41300: [Backport #8489]
    
    * compile.c (rb_iseq_compile_node): fix location of a `trace'
      instruction (b_return event).
      [ruby-core:55305] [ruby-trunk - Bug #8489]
      (need a backport to 2.0.0?)
    
    * test/ruby/test_settracefunc.rb: add a test.

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/compile.c
    branches/ruby_2_0_0/test/ruby/test_settracefunc.rb
    branches/ruby_2_0_0/version.h

Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 41318)
+++ ruby_2_0_0/ChangeLog	(revision 41319)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Sun Jun 16 01:11:10 2013  Koichi Sasada  <ko1@a...>
+
+	* compile.c (rb_iseq_compile_node): fix location of a `trace'
+	  instruction (b_return event).
+	  [ruby-core:55305] [ruby-trunk - Bug #8489]
+	  (need a backport to 2.0.0?)
+
+	* test/ruby/test_settracefunc.rb: add a test.
+
 Sun Jun 16 00:30:56 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* vm_eval.c (eval_string_with_cref): propagate absolute path from the
Index: ruby_2_0_0/compile.c
===================================================================
--- ruby_2_0_0/compile.c	(revision 41318)
+++ ruby_2_0_0/compile.c	(revision 41319)
@@ -483,8 +483,8 @@ rb_iseq_compile_node(VALUE self, NODE *n https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/compile.c#L483
 		ADD_LABEL(ret, start);
 		ADD_TRACE(ret, FIX2INT(iseq->location.first_lineno), RUBY_EVENT_B_CALL);
 		COMPILE(ret, "block body", node->nd_body);
-		ADD_TRACE(ret, nd_line(node), RUBY_EVENT_B_RETURN);
 		ADD_LABEL(ret, end);
+		ADD_TRACE(ret, nd_line(node), RUBY_EVENT_B_RETURN);
 
 		/* wide range catch handler must put at last */
 		ADD_CATCH_ENTRY(CATCH_TYPE_REDO, start, end, 0, start);
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 41318)
+++ ruby_2_0_0/version.h	(revision 41319)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2013-06-16"
-#define RUBY_PATCHLEVEL 218
+#define RUBY_PATCHLEVEL 219
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 6
Index: ruby_2_0_0/test/ruby/test_settracefunc.rb
===================================================================
--- ruby_2_0_0/test/ruby/test_settracefunc.rb	(revision 41318)
+++ ruby_2_0_0/test/ruby/test_settracefunc.rb	(revision 41319)
@@ -1007,4 +1007,17 @@ class TestSetTraceFunc < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_settracefunc.rb#L1007
       set_trace_func(nil)
     end
   end
+
+  def test_tracepoint_b_return_with_next
+    n = 0
+    TracePoint.new(:b_return){
+      n += 1
+    }.enable{
+      3.times{
+        next
+      } # 3 times b_retun
+    }   # 1 time b_return
+
+    assert_equal 4, n
+  end
 end

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r41300


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

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