Skip to content
Merged
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
4 changes: 2 additions & 2 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ nav_order: 6

## main

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

*George Holborn*
*George Holborn*, *Joel Hawksley*

* Add `protocol` parameter to `with_request_url` test helper to enable testing with HTTPS protocol.

Expand Down
2 changes: 1 addition & 1 deletion lib/view_component/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def compiled_source
result = super
# 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
result = result.partition(";").last if @strip_annotation_line
result
end
end
Expand Down
1 change: 0 additions & 1 deletion test/sandbox/test/mailer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ class MailerTest < ActionMailer::TestCase
def test_rendering_component_in_an_action_mailer
result = TestMailer.test_email.deliver_now.body.to_s
assert_includes result, "<div>Hello world!</div>"
assert_includes result, "test_email.html.erb"
end

def test_rendering_component_in_an_action_mailer_with_asset_component
Expand Down
Loading