From bb6e171adbe29a7b0892f56a303c1715bf9a66e3 Mon Sep 17 00:00:00 2001 From: nagachika Date: Tue, 16 Aug 2016 03:00:20 +0000 Subject: merge revision(s) 53424,55509: [Backport #12517] * test/coverage/test_coverage.rb: ignored test when enabled to coverage. It lead to crash with `make test-all`. * compile.c (ADD_TRACE): ignore trace instruction on non-positive line. * parse.y (coverage): get rid of ArgumentError when the starting line number is not positive. [ruby-core:76141] [Bug #12517] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- compile.c | 1 + 1 file changed, 1 insertion(+) (limited to 'compile.c') diff --git a/compile.c b/compile.c index dc5b890787..1c29a721ac 100644 --- a/compile.c +++ b/compile.c @@ -252,6 +252,7 @@ r_value(VALUE value) #define ADD_TRACE(seq, line, event) \ do { \ if ((event) == RUBY_EVENT_LINE && ISEQ_COVERAGE(iseq) && \ + (line) > 0 && \ (line) != ISEQ_COMPILE_DATA(iseq)->last_coverable_line) { \ RARRAY_ASET(ISEQ_COVERAGE(iseq), (line) - 1, INT2FIX(0)); \ ISEQ_COMPILE_DATA(iseq)->last_coverable_line = (line); \ -- cgit v1.2.3