ruby-changes:28798
From: zzak <ko1@a...>
Date: Mon, 20 May 2013 11:52:47 +0900 (JST)
Subject: [ruby-changes:28798] zzak:r40850 (trunk): * lib/pp.rb: Revert part of r40834 and nodoc PP::ObjectMixin
zzak 2013-05-20 11:52:29 +0900 (Mon, 20 May 2013) New Revision: 40850 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40850 Log: * lib/pp.rb: Revert part of r40834 and nodoc PP::ObjectMixin Modified files: trunk/ChangeLog trunk/lib/pp.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 40849) +++ ChangeLog (revision 40850) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon May 20 11:50:12 2013 Zachary Scott <zachary@z...> + + * lib/pp.rb: Revert part of r40834 and nodoc PP::ObjectMixin + [ruby-core:55068] + Mon May 20 10:40:21 2013 Nobuyoshi Nakada <nobu@r...> * lib/webrick/htmlutils.rb (WEBrick::HTMLUtils#escape): replace HTML Index: lib/pp.rb =================================================================== --- lib/pp.rb (revision 40849) +++ lib/pp.rb (revision 40850) @@ -300,35 +300,7 @@ class PP < PrettyPrint https://github.com/ruby/ruby/blob/trunk/lib/pp.rb#L300 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 - # #=> #<Cat:0x007f8dfb994900 @name="ginger"> - # ginger.age = 2 - # ginger.color = "red" - # p ginger - # #=> #<Cat:0x007f8dfb994900 @age=2, @color="red", @name="ginger"> - module ObjectMixin + module ObjectMixin # :nodoc: # 1. specific pretty_print # 2. specific inspect # 3. generic pretty_print -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/