diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-29 12:11:29 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-29 12:11:29 +0000 |
commit | c979cbfcf64e6ab8972eef0e733b7e6a346726dd (patch) | |
tree | 74154f4c87f238d50a4a4d17068bfeed690f791e | |
parent | dc087bf85da49b20ecb89e7806bb790f72c489a7 (diff) | |
download | ruby-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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/pp.rb | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Tue Sep 29 21:03:59 2009 Yusuke Endoh <mame@tsg.ne.jp> + + * lib/pp.rb (Kernel#pp): returns its arguments, like Kernel#p. + Tue Sep 29 17:02:45 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/json/lib/json/common.rb (recurse_proc): removed needless @@ -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 |