1
0
Fork 0
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:
John Mair 2013-01-12 22:15:25 +01:00
parent 54baa7a463
commit a604fd6972

View file

@ -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