modified Pry.view so that it uses 'inspect' for all objects. Now all evaluation output uses #inspect

This commit is contained in:
John Mair 2011-05-11 21:35:28 +12:00
parent 53c52a46a9
commit 7a5947aa4b
1 changed files with 1 additions and 6 deletions

View File

@ -146,12 +146,7 @@ class Pry
# @param obj The object to view.
# @return [String] The string representation of `obj`.
def self.view(obj)
case obj
when String, Hash, Array, Symbol, Exception, nil
obj.inspect
else
obj.to_s
end
obj.inspect
rescue NoMethodError
"unknown"