summaryrefslogtreecommitdiff
path: root/test/coverage/test_coverage.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-10 16:19:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-10 16:19:40 +0000
commitd446f15c975923dd55757b44a059716d5299c92d (patch)
treecbab2696a97fc80c1ca8a544473c9f20e4f75bff /test/coverage/test_coverage.rb
parent93272b35f1192d12c5acec75ba95101b33e170e2 (diff)
compile.c: pop coverage trace
* compile.c (iseq_compile_each0): pop trace for coverage only and clear its corresponding line. [ruby-core:82726] [Bug #13886] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/coverage/test_coverage.rb')
-rw-r--r--test/coverage/test_coverage.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/coverage/test_coverage.rb b/test/coverage/test_coverage.rb
index 23672fc..2858260 100644
--- a/test/coverage/test_coverage.rb
+++ b/test/coverage/test_coverage.rb
@@ -165,4 +165,14 @@ class TestCoverage < Test::Unit::TestCase
}
}
end
+
+ def test_nocoverage_optimized_line
+ assert_ruby_status(%w[], "#{<<-"begin;"}\n#{<<-'end;'}")
+ begin;
+ def foo(x)
+ x # optimized away
+ nil
+ end
+ end;
+ end
end