modified Pry.view so that it uses 'inspect' for all objects. Now all evaluation output uses #inspect
This commit is contained in:
parent
53c52a46a9
commit
7a5947aa4b
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue