mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/pp.rb (pp): return nil like p.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c4af72cd46
commit
4795daf1bc
3 changed files with 10 additions and 2 deletions
|
@ -55,6 +55,8 @@ I like the latter. If you do too, this library is for you.
|
|||
: pp(obj)
|
||||
output ((|obj|)) to (({$>})) in pretty printed format.
|
||||
|
||||
It returns (({nil})).
|
||||
|
||||
== Customized output
|
||||
To define your customized pretty printing function for your class,
|
||||
redefine a method (({pretty_print(((|pp|)))})) in the class.
|
||||
|
@ -110,6 +112,7 @@ module Kernel
|
|||
objs.each {|obj|
|
||||
PP.pp(obj)
|
||||
}
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue