mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
show-source: prettier error messages
This commit is contained in:
parent
54baa7a463
commit
a604fd6972
1 changed files with 1 additions and 0 deletions
|
@ -25,6 +25,7 @@ class Pry
|
|||
|
||||
# The source for code_object prepared for display.
|
||||
def content_for(code_object)
|
||||
raise CommandError, "Cannot locate source!" if !code_object.source
|
||||
Code.new(code_object.source, start_line_for(code_object)).
|
||||
with_line_numbers(use_line_numbers?).to_s
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue