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

Fallback to Thread::Backtrace::Location#path when #absolute_path is nil #255

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

n-rodriguez
Copy link

Hi there!

For some reasons sometimes Thread::Backtrace::Location#absolute_path is nil.

In this case try to fallback to Thread::Backtrace::Location#path

caller_locations(1, 1)[0].to_s               => /Users/nicolas/PROJECTS/CONCERTO/concerto/.bundle/ruby/3.3.0/bundler/gems/health_monitor-45570d6686b9/lib/health_monitor/configuration.rb:25:in `database'
caller_locations(1, 1)[0].absolute_path.to_s => 
caller_locations(1, 1)[0].path.to_s          => /Users/nicolas/PROJECTS/CONCERTO/concerto/.bundle/ruby/3.3.0/bundler/gems/health_monitor-45570d6686b9/lib/health_monitor/configuration.rb

Thank you!

@n-rodriguez
Copy link
Author

ping @schneems

1 similar comment
@n-rodriguez
Copy link
Author

ping @schneems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant