Created
October 25, 2019 16:09
-
-
Save jaydorsey/17ef9cee2a31f902c7229099b3dc2d06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file lives in the pry gem. This patch strips out backtrace information from the gems, so I | |
# only see _my_ code files related to an error when I'm in a pry session | |
# | |
# Replace the content in the begin block inside the +show_result+ method | |
# | |
# @todo Make this a separate gem that I can install to patch this method without having to edit my | |
# bundled pry gem | |
relevant_context = e.backtrace.reject { |b| b =~ /(ruby\/gem)|(asdf\/installs)/ } | |
output.puts "(pry) output error: #{e.inspect}\n\nRelevant files:\n\n#{relevant_context.join("\n")}\n\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment