Actions
Bug #21259
open
The Prism compiler wrongly creates a line number of zero
Description
test.rb
TracePoint.new(:line) do |tp|
p tp
end.enable
load "./target.rb"
target.rb
if true..true
end
$ ~/work/ruby/local/bin/ruby --parser=prism test.rb
#<TracePoint:line test.rb:5>
#<TracePoint:line /tmp/reproduce-simplecov-ruby34-bug/target.rb:0> # <=== This lineno should be 1
$ ~/work/ruby/local/bin/ruby --parser=parse.y test.rb
#<TracePoint:line test.rb:5>
#<TracePoint:line /tmp/reproduce-simplecov-ruby34-bug/target.rb:1>
Updated by mame (Yusuke Endoh) 5 days ago
- Related to Bug #21220: Memory corruption in update_line_coverage() [write at index -1] added
Actions
Like0
Like0