1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
mame 2009-09-29 12:11:29 +00:00
parent dc087bf85d
commit c979cbfcf6
2 changed files with 6 additions and 2 deletions

View file

@ -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> Tue Sep 29 17:02:45 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/json/lib/json/common.rb (recurse_proc): removed needless * ext/json/lib/json/common.rb (recurse_proc): removed needless

View file

@ -54,12 +54,12 @@ module Kernel
private private
# prints arguments in pretty form. # prints arguments in pretty form.
# #
# pp returns nil. # pp returns argument(s).
def pp(*objs) # :doc: def pp(*objs) # :doc:
objs.each {|obj| objs.each {|obj|
PP.pp(obj) PP.pp(obj)
} }
nil objs.size <= 1 ? objs.first : objs
end end
module_function :pp module_function :pp
end end