Skip to content

Conversation

@tombruijn
Copy link
Member

@tombruijn tombruijn commented Sep 28, 2024

In Rails apps the app root path is a Pathname instance. We can't use it the same way as a String when using it in .start_with? when comparing backtrace lines for error causes in
Transaction#first_formatted_backtrace_line.

Fix this by casting the root_path always to a String in the Config initializer so we're always sure it's a String and can use it as such.

[skip review]

@tombruijn tombruijn added the bug Confirmed and unconfirmed bugs reported by us and customers. label Sep 28, 2024
@tombruijn tombruijn self-assigned this Sep 28, 2024
@tombruijn
Copy link
Member Author

In Rails apps the app root path is a Pathname instance. We can't use it
the same way as a String when using it in `.start_with?` when comparing
backtrace lines for error causes in
`Transaction#first_formatted_backtrace_line`.

Fix this by casting the root_path always to a String in the Config
initializer so we're always sure it's a String and can use it as such.
@tombruijn tombruijn force-pushed the fix-pathname-conversion branch from 50eb951 to 3000fc8 Compare September 28, 2024 09:28
@tombruijn tombruijn marked this pull request as ready for review September 28, 2024 09:35
@tombruijn tombruijn merged commit b767f26 into main Sep 28, 2024
122 checks passed
@tombruijn tombruijn deleted the fix-pathname-conversion branch September 28, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Confirmed and unconfirmed bugs reported by us and customers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant