From d0ea0b4a8dd44a90bdd3cd83ac94fe1ba4aea440 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 20 Jan 2003 19:17:15 +0000 Subject: refine previous change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/pp.rb | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'lib/pp.rb') diff --git a/lib/pp.rb b/lib/pp.rb index 0ff1456285..7456ba12c3 100644 --- a/lib/pp.rb +++ b/lib/pp.rb @@ -242,7 +242,6 @@ class PP < PrettyPrint # 3. generic pretty_print def pretty_print(pp) - # specific pretty_print is not defined, try specific inspect. if /\(Kernel\)#/ !~ method(:inspect).inspect || /\(Kernel\)#/ !~ method(:to_s).inspect pp.text inspect @@ -271,14 +270,6 @@ class PP < PrettyPrint end end -[Numeric, FalseClass, TrueClass, Module].each {|c| - c.class_eval { - def pretty_print(pp) - pp.text self.to_s - end - } -} - class Array def pretty_print(pp) pp.group(1, '[', ']') { @@ -419,22 +410,10 @@ class File end end -class << ARGF - def pretty_print(pp) - pp.text self.to_s - end -end - class Object include PP::ObjectMixin end -[Numeric, Symbol, FalseClass, TrueClass, NilClass, Module].each {|c| - c.class_eval { - alias :pretty_print_cycle :pretty_print - } -} - if __FILE__ == $0 require 'runit/testcase' require 'runit/cui/testrunner' -- cgit v1.2.3