Actions
Bug #20866
openPrism assertion when running simplecov with branch coverage and requiring certain code
ruby -v:
ruby 3.4.0dev (2024-11-05T13:53:41Z master ed06f018bd) +PRISM [x86_64-linux]
Description
I stumbled upon the following bug report against simplecov: https://github.com/simplecov-ruby/simplecov/issues/1113
I reduced the error down to the following:
# Gemfile
source "https://rubygems.org"
gem "simplecov"
# test.rb
require "bundler"
require "simplecov"
SimpleCov.start do
enable_coverage :branch
end
require_relative "external"
# external.rb
def perform_completion
case @completion_state
when CompletionState::PERFECT_MATCH
@dig_perfect_match_proc&.(@perfect_matched)
end
end
$ bundle exec ruby test.rb
ruby: prism/util/pm_newline_list.c:93: pm_newline_list_line_column: Assertion `cursor >= list->start' failed.
Aborted (core dumped)
When running with parse.y
the error doesn't occur.
Updated by alanwu (Alan Wu) 16 days ago
- Assignee set to prism
Updated by hsbt (Hiroshi SHIBATA) 8 days ago
- Status changed from Open to Assigned
Updated by eightbitraptor (Matt V-H) about 13 hours ago
This was caused by an issue with how the prism compiler tracks the ending location of call nodes of the form a&.()
.
Should be fixed by this PR
Actions
Like0
Like0Like0Like0