Issue #14888 has been updated by ko1 (Koichi Sasada).


sorry to left this ticket.

`script_compiled` solves it? 
[Feature #15287]

----------------------------------------
Feature #14888: Add trace point for eval (and related functions)
https://bugs.ruby-lang.org/issues/14888#change-75525

* Author: ioquatix (Samuel Williams)
* Status: Assigned
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* Target version: 
----------------------------------------
I'm working on an improved coverage library for Ruby which can compute coverage of things like ERB templates where the source file is not Ruby code but is translated to Ruby code using `eval`.

When using the line trace point, the path is the original template file (e.g. page.erb), which is problematic because this file isn't Ruby code nor do we generally know how to handle that file.

Ideally, we capture calls to `eval`, including the source, line number, and path, so we can match up with the path given by the line trace point and parse the correct source/ast.

In order to do that, it would be great to have a specific trace point for `eval` (and related functions). Ideally, the trace point would capture all the arguments to eval so they could be processed correctly. This would allow such coverage library to correctly find the right code/AST for a given file path.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>