summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-14 02:36:26 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-14 02:36:26 +0000
commit68394b27ba9b22f200ba5db90c0f3cb35fa41ebb (patch)
treed049650e97ea9adc7dc183b5bb600885606a3a60 /test
parent4d5c414fcc0cd1c01580a1f9dc05a613c13929b2 (diff)
[EXPERIMENTAL] Extend the API of `Coverage.start` and `result`
The old API: Coverage.start load "foo.rb" p Coverage.result #=> {"foo.rb" => [1, 2, nil]} The new API: ENV["COVERAGE_EXPERIMENTAL_MODE"] = "true" Coverage.start(lines: true) load "foo.rb" p Coverage.result #=> {"foo.rb" => {:lines => [1, 2, nil]}} This new API allows us to add other measuring target types. Notes: * To keep compatibility, the old interface is still remained; passing no optional argument makes `Coverage.result` return the old format. * This feature is still experimental. So, to enable the new API, the environment variable `COVERAGE_EXPERIMENTAL_MODE` must be set. I plan to activate this feature by Ruby 2.5. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions