Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nav_order: 6
# Changelog

## main

* Fix segfault when Ruby coverage is enabled but template annotations are disabled.

*George Holborn*
Expand Down
1 change: 1 addition & 0 deletions lib/view_component/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def compiled_source
# Strip the annotation line to maintain correct line numbers when coverage
# is running (avoids segfault from negative lineno)
result = result.sub(/\A[^\n]*\n/, "") if @strip_annotation_line
raise if @strip_annotation_line
result
end
end
Expand Down
Loading