mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 17:14:01 +02:00
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_2@55943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4142e34eb1
commit
81d5b69981
5 changed files with 26 additions and 3 deletions
|
@ -245,6 +245,7 @@ r_value(VALUE value)
|
|||
#define ADD_TRACE(seq, line, event) \
|
||||
do { \
|
||||
if ((event) == RUBY_EVENT_LINE && iseq->coverage && \
|
||||
(line) > 0 && \
|
||||
(line) != iseq->compile_data->last_coverable_line) { \
|
||||
RARRAY_ASET(iseq->coverage, (line) - 1, INT2FIX(0)); \
|
||||
iseq->compile_data->last_coverable_line = (line); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue