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

Use backtrace location #57

Closed
JoshCheek opened this issue Mar 30, 2015 · 2 comments
Closed

Use backtrace location #57

JoshCheek opened this issue Mar 30, 2015 · 2 comments

Comments

@JoshCheek
Copy link
Owner

It contains all the info we parse out of the lines of the backtrace. But I need to go back and see how long that has been a thing (ie needs to work on 1.9.3)

(raise 'omg' rescue $!).backtrace_locations.first.tap { |btl|
  btl.lineno        # => 1
  btl.label         # => "<main>"
  btl.base_label    # => "<main>"
  btl.path          # => "/var/folders/7g/mbft22555w3_2nqs_h1kbglw0000gn/T/seeing_is_believing_temp_dir20150330-70943-rcok8r/program.rb"
  btl.absolute_path # => "/private/var/folders/7g/mbft22555w3_2nqs_h1kbglw0000gn/T/seeing_is_believing_temp_dir20150330-70943-rcok8r/program.rb"
}
@JoshCheek
Copy link
Owner Author

backtrace_locations doesn't work on 1.9.3, but 1.9.3 has been EOL'd... maybe drop support in v3? IDK, maybe it's fine as it is.

@ckib16
Copy link
Collaborator

ckib16 commented Jan 29, 2017

@ckib16 ckib16 closed this as completed Jan 29, 2017
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

No branches or pull requests

2 participants