summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-29 12:11:29 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-29 12:11:29 +0000
commitc979cbfcf64e6ab8972eef0e733b7e6a346726dd (patch)
tree74154f4c87f238d50a4a4d17068bfeed690f791e /lib
parentdc087bf85da49b20ecb89e7806bb790f72c489a7 (diff)
downloadbundler-c979cbfcf64e6ab8972eef0e733b7e6a346726dd.tar.gz
* lib/pp.rb (Kernel#pp): returns its arguments, like Kernel#p.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/pp.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pp.rb b/lib/pp.rb
index 2804ecd117..b02e954a7d 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -54,12 +54,12 @@ module Kernel
private
# prints arguments in pretty form.
#
- # pp returns nil.
+ # pp returns argument(s).
def pp(*objs) # :doc:
objs.each {|obj|
PP.pp(obj)
}
- nil
+ objs.size <= 1 ? objs.first : objs
end
module_function :pp
end