diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-16 17:05:22 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-16 17:05:22 +0000 |
commit | 16c7d13e4f308e9a96d35198422b8e10f9d3f7d5 (patch) | |
tree | b4d361f459c0d887e4883d54ba1f6bf4ac834df2 /lib/pp.rb | |
parent | 618bfa375c17ba076edc3bff22fcd22bd2a2f9aa (diff) |
* lib/pp.rb (Kernel#pretty_inspect): defined for pretty printed
string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/pp.rb')
-rw-r--r-- | lib/pp.rb | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -46,8 +46,16 @@ require 'prettyprint' module Kernel + # returns a pretty printed object as a string. + def pretty_inspect + PP.pp(self, '') + end + private - def pp(*objs) + # prints arguments in pretty form. + # + # pp returns nil. + def pp(*objs) # :doc: objs.each {|obj| PP.pp(obj) } |