diff --git a/ChangeLog b/ChangeLog index 31dc431223..2b8453a0c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon May 20 11:50:12 2013 Zachary Scott + + * lib/pp.rb: Revert part of r40834 and nodoc PP::ObjectMixin + [ruby-core:55068] + Mon May 20 10:40:21 2013 Nobuyoshi Nakada * lib/webrick/htmlutils.rb (WEBrick::HTMLUtils#escape): replace HTML diff --git a/lib/pp.rb b/lib/pp.rb index be8e389356..96e461a928 100644 --- a/lib/pp.rb +++ b/lib/pp.rb @@ -300,35 +300,7 @@ class PP < PrettyPrint include PPMethods end - # Allows you to implement pretty print in your own class, for example: - # require 'pp' - # - # class Cat - # include PP::ObjectMixin - # - # attr_accessor :name, :age, :color - # - # def initialize name - # @name = name - # end - # - # def pretty_print q - # q.pp_object self - # end - # alias inspect pretty_print_inspect - # - # end - # - # In order to use this class, try the following: - # - # ginger = Cat.new("ginger") - # p ginger - # #=> # - # ginger.age = 2 - # ginger.color = "red" - # p ginger - # #=> # - module ObjectMixin + module ObjectMixin # :nodoc: # 1. specific pretty_print # 2. specific inspect # 3. generic pretty_print