summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--ext/coverage/coverage.c9
-rw-r--r--test/coverage/test_coverage.rb1
-rw-r--r--tool/test-coverage.rb1
4 files changed, 4 insertions, 10 deletions
diff --git a/NEWS b/NEWS
index 649e6fd..14a7c7f 100644
--- a/NEWS
+++ b/NEWS
@@ -152,6 +152,9 @@ with all sufficient information, see the ChangeLog file or Redmine
* Add Bundler to Standard Library. [Feature #12733]
+* Coverage
+ * Support branch coverage and method coverage [Feature #13901]
+
* DRb
* ACL::ACLEntry.new no longer suppresses IPAddr::InvalidPrefixError.
diff --git a/ext/coverage/coverage.c b/ext/coverage/coverage.c
index a8f6bb5..f46955a 100644
--- a/ext/coverage/coverage.c
+++ b/ext/coverage/coverage.c
@@ -25,15 +25,8 @@ static VALUE
rb_coverage_start(int argc, VALUE *argv, VALUE klass)
{
VALUE coverages, opt;
- int mode, experimental_mode_enabled = 1;
+ int mode;
- {
- const char *e = getenv("COVERAGE_EXPERIMENTAL_MODE");
- if (!e || !*e) experimental_mode_enabled = 0;
- }
-
- if (!experimental_mode_enabled && argc != 0)
- rb_error_arity(argc, 0, 0);
rb_scan_args(argc, argv, "01", &opt);
if (argc == 0) {
diff --git a/test/coverage/test_coverage.rb b/test/coverage/test_coverage.rb
index 8fdef0d..01bacd9 100644
--- a/test/coverage/test_coverage.rb
+++ b/test/coverage/test_coverage.rb
@@ -184,7 +184,6 @@ class TestCoverage < Test::Unit::TestCase
File.write("test.rb", code)
assert_in_out_err(%w[-W0 -rcoverage], <<-"end;", stdout, [])
- ENV["COVERAGE_EXPERIMENTAL_MODE"] = "true"
Coverage.start(#{ opt })
tmp = Dir.pwd
require tmp + '/test.rb'
diff --git a/tool/test-coverage.rb b/tool/test-coverage.rb
index d1c324a..7a27c5c 100644
--- a/tool/test-coverage.rb
+++ b/tool/test-coverage.rb
@@ -1,6 +1,5 @@
require "coverage"
-ENV["COVERAGE_EXPERIMENTAL_MODE"] = "true"
Coverage.start(lines: true, branches: true, methods: true)
TEST_COVERAGE_DATA_FILE = "test-coverage.dat"