Permalink
Browse files

reload-code: use obj_name (rather than code_object) in output strings

  • Loading branch information...
banister committed Jan 5, 2013
1 parent 38e49b1 commit 6254b8a0a0abcb23f92ea75c43b5cb96da170e31
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/pry/commands/reload_code.rb
@@ -15,7 +15,7 @@ def process
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 @@ def check_for_reloadability(code_object)
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

0 comments on commit 6254b8a

Please sign in to comment.