* compile.c (rb_iseq_compile_node): put start label of block after

trace (b_call).
  [Bug #9964]
* test/ruby/test_settracefunc.rb: add a test.
  added assert_consistent_call_return() method check call/return
  consistency.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2014-06-19 22:09:23 +00:00
parent 500f9777c9
commit 13f0b628d7
3 changed files with 60 additions and 1 deletions

View file

@ -483,8 +483,8 @@ rb_iseq_compile_node(VALUE self, NODE *node)
LABEL *start = iseq->compile_data->start_label = NEW_LABEL(0);
LABEL *end = iseq->compile_data->end_label = NEW_LABEL(0);
ADD_LABEL(ret, start);
ADD_TRACE(ret, FIX2INT(iseq->location.first_lineno), RUBY_EVENT_B_CALL);
ADD_LABEL(ret, start);
COMPILE(ret, "block body", node->nd_body);
ADD_LABEL(ret, end);
ADD_TRACE(ret, nd_line(node), RUBY_EVENT_B_RETURN);