mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
reload-code: use obj_name (rather than code_object) in output strings
This commit is contained in:
parent
38e49b16d3
commit
6254b8a0a0
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ class Pry
|
|||
|
||||
def reload_code_object(code_object)
|
||||
load code_object.source_file
|
||||
output.puts "#{code_object} was reloaded!"
|
||||
output.puts "#{obj_name} was reloaded!"
|
||||
end
|
||||
|
||||
def obj_name
|
||||
|
@ -26,7 +26,7 @@ class Pry
|
|||
if !code_object
|
||||
raise CommandError, "Cannot locate #{obj_name}!"
|
||||
elsif !File.exists?(code_object.source_file)
|
||||
raise CommandError, "Cannot reload #{code_object} as it has no associated file on disk. File found was: #{code_object.source_file}"
|
||||
raise CommandError, "Cannot reload #{obj_name} as it has no associated file on disk. File found was: #{code_object.source_file}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue