lib/pp.rb (Kernel#pp): Fix a race condition
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
faae29f869
commit
4ae87f0ad6
@ -17,13 +17,14 @@ module Kernel
|
|||||||
# prints arguments in pretty form.
|
# prints arguments in pretty form.
|
||||||
#
|
#
|
||||||
# pp returns argument(s).
|
# pp returns argument(s).
|
||||||
undef pp if method_defined?(:pp)
|
alias __pp_backup__ pp if method_defined?(:pp)
|
||||||
def pp(*objs)
|
def pp(*objs)
|
||||||
objs.each {|obj|
|
objs.each {|obj|
|
||||||
PP.pp(obj)
|
PP.pp(obj)
|
||||||
}
|
}
|
||||||
objs.size <= 1 ? objs.first : objs
|
objs.size <= 1 ? objs.first : objs
|
||||||
end
|
end
|
||||||
|
undef __pp_backup__ if method_defined?(:__pp_backup__)
|
||||||
module_function :pp
|
module_function :pp
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user