Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Pathname to String conversion error #1310

Merged
merged 1 commit into from
Sep 28, 2024
Merged

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 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 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant