aboutsummaryrefslogtreecommitdiffstats
path: root/lib/pp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pp.rb')
-rw-r--r--lib/pp.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/pp.rb b/lib/pp.rb
index b02e954a7d..2fcb4af820 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -270,7 +270,7 @@ class PP < PrettyPrint
module ObjectMixin
# 1. specific pretty_print
# 2. specific inspect
- # 3. specific to_s if instance variable is empty
+ # 3. specific to_s
# 4. generic pretty_print
# A default pretty printing method for general objects.
@@ -296,8 +296,7 @@ class PP < PrettyPrint
q.text self.inspect
elsif !inspect_method && self.respond_to?(:inspect)
q.text self.inspect
- elsif to_s_method && /\(Kernel\)#/ !~ to_s_method.inspect &&
- instance_variables.empty?
+ elsif to_s_method && /\(Kernel\)#/ !~ to_s_method.inspect
q.text self.to_s
elsif !to_s_method && self.respond_to?(:to_s)
q.text self.to_s