diff --git a/ChangeLog b/ChangeLog index e96d7ac1ca..01fe0945df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Sep 29 21:03:59 2009 Yusuke Endoh + + * lib/pp.rb (Kernel#pp): returns its arguments, like Kernel#p. + Tue Sep 29 17:02:45 2009 Nobuyoshi Nakada * ext/json/lib/json/common.rb (recurse_proc): removed needless 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