From: "mame (Yusuke Endoh)" Date: 2022-09-22T22:22:45+00:00 Subject: [ruby-core:110007] [Ruby master Feature#19008] Introduce coverage support for `eval`. Issue #19008 has been updated by mame (Yusuke Endoh). @ioquatix I found yet another issue. It does not work with oneshot coverage. ```ruby require "coverage" Coverage.start(oneshot_lines: true) # the content of tt.rb # # 1: 100.times do # 2: 1 # 3: end load "tt.rb" eval(< expected: {"tt.rb"=>{:oneshot_lines=>[1, 2]}, "dummy.rb"=>{:oneshot_lines=>[1, 2, 3]}} #=> actual: {"tt.rb"=>{:oneshot_lines=>[1, 2]}} ``` TBH I'm unsure which behavior is better. But anyway could you please investigate why it does not work? ---------------------------------------- Feature #19008: Introduce coverage support for `eval`. https://bugs.ruby-lang.org/issues/19008#change-99258 * Author: ioquatix (Samuel Williams) * Status: Open * Priority: Normal ---------------------------------------- I'd like to introduce coverage support for `eval`. I mostly only care about the case where an explicit path is given, and I'd even be okay to only handle the case where the line number is the default (0). https://github.com/ruby/ruby/pull/6396 This is an incredibly useful feature for computing coverage of ERB templates and other similar things. -- https://bugs.ruby-lang.org/ Unsubscribe: