Project

General

Profile

Bug #12812

Added Coverage#result=

Added by zenspider (Ryan Davis) almost 3 years ago. Updated 3 months ago.

Status:
Rejected
Priority:
Normal
Target version:
-
[ruby-core:77493]

Description

Originally submitted here: https://github.com/ruby/ruby/pull/1456

This exposes Coverage.result in a slightly more writeable way and allows coverage analysis to reset to a baseline in a safe way.

Note, I wasn't able to figure out how to invalidate the cached pointers in the VM bytecode, so this does rb_ary_replace across all the arrays instead. I'd love to see this improved so it were cleaner.

This is ongoing work to improve the current state of code coverage analysis. I'll be giving a talk on this at rubyconf 2016.

I should also add, this applies cleanly to (at least) 2.3 as well.

History

Updated by hsbt (Hiroshi SHIBATA) almost 3 years ago

  • Assignee set to mame (Yusuke Endoh)
  • Status changed from Open to Assigned
#2

Updated by zenspider (Ryan Davis) almost 3 years ago

  • File deleted (coverage_result_set.diff)

Updated by zenspider (Ryan Davis) almost 3 years ago

This patch url will stay up to date better than a file attachment. I'm getting feedback from Nobu and fixing things:

https://github.com/ruby/ruby/pull/1456.patch

Updated by mame (Yusuke Endoh) 6 months ago

  • Status changed from Assigned to Feedback

Sorry for leaving this ticket untouched.

I cannot remember the detailed story of this ticket, but since 2.6, coverage library has supported Coverage.result(stop: false, clear: false). Is it enough? I still think Coverage.result= is too powerful.

Updated by mame (Yusuke Endoh) 3 months ago

  • Status changed from Feedback to Rejected

I'd like to close this issue tentatively. Feel free to reopen if you still think it is needed.

Also available in: Atom PDF