Skip to content

Commit 113d359

Browse files
committed
merge revision(s) 41300: [Backport ruby#8489]
* compile.c (rb_iseq_compile_node): fix location of a `trace' instruction (b_return event). [ruby-core:55305] [ruby-trunk - Bug ruby#8489] (need a backport to 2.0.0?) * test/ruby/test_settracefunc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent e563396 commit 113d359

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Sun Jun 16 01:11:10 2013 Koichi Sasada <[email protected]>
2+
3+
* compile.c (rb_iseq_compile_node): fix location of a `trace'
4+
instruction (b_return event).
5+
[ruby-core:55305] [ruby-trunk - Bug #8489]
6+
(need a backport to 2.0.0?)
7+
8+
* test/ruby/test_settracefunc.rb: add a test.
9+
110
Sun Jun 16 00:30:56 2013 Nobuyoshi Nakada <[email protected]>
211

312
* vm_eval.c (eval_string_with_cref): propagate absolute path from the

compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,8 @@ rb_iseq_compile_node(VALUE self, NODE *node)
483483
ADD_LABEL(ret, start);
484484
ADD_TRACE(ret, FIX2INT(iseq->location.first_lineno), RUBY_EVENT_B_CALL);
485485
COMPILE(ret, "block body", node->nd_body);
486-
ADD_TRACE(ret, nd_line(node), RUBY_EVENT_B_RETURN);
487486
ADD_LABEL(ret, end);
487+
ADD_TRACE(ret, nd_line(node), RUBY_EVENT_B_RETURN);
488488

489489
/* wide range catch handler must put at last */
490490
ADD_CATCH_ENTRY(CATCH_TYPE_REDO, start, end, 0, start);

test/ruby/test_settracefunc.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,4 +1007,17 @@ def each
10071007
set_trace_func(nil)
10081008
end
10091009
end
1010+
1011+
def test_tracepoint_b_return_with_next
1012+
n = 0
1013+
TracePoint.new(:b_return){
1014+
n += 1
1015+
}.enable{
1016+
3.times{
1017+
next
1018+
} # 3 times b_retun
1019+
} # 1 time b_return
1020+
1021+
assert_equal 4, n
1022+
end
10101023
end

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define RUBY_VERSION "2.0.0"
22
#define RUBY_RELEASE_DATE "2013-06-16"
3-
#define RUBY_PATCHLEVEL 218
3+
#define RUBY_PATCHLEVEL 219
44

55
#define RUBY_RELEASE_YEAR 2013
66
#define RUBY_RELEASE_MONTH 6

0 commit comments

Comments
 (0)