Project

General

Profile

Actions

Bug #21259

open

The Prism compiler wrongly creates a line number of zero

Added by mame (Yusuke Endoh) 5 days ago.

Status:
Assigned
Assignee:
Target version:
-
[ruby-core:121605]

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>

Related issues 1 (0 open1 closed)

Related to Ruby - Bug #21220: Memory corruption in update_line_coverage() [write at index -1]ClosedActions
Actions #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

Also available in: Atom PDF

Like0
Like0