From 4ae87f0ad60e141a83c8c53ff76298adf1eae8f5 Mon Sep 17 00:00:00 2001 From: mame Date: Fri, 1 Dec 2017 00:41:17 +0000 Subject: [PATCH] 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 --- lib/pp.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pp.rb b/lib/pp.rb index 0e737d23f6..9acb02f61e 100644 --- a/lib/pp.rb +++ b/lib/pp.rb @@ -17,13 +17,14 @@ module Kernel # prints arguments in pretty form. # # pp returns argument(s). - undef pp if method_defined?(:pp) + alias __pp_backup__ pp if method_defined?(:pp) def pp(*objs) objs.each {|obj| PP.pp(obj) } objs.size <= 1 ? objs.first : objs end + undef __pp_backup__ if method_defined?(:__pp_backup__) module_function :pp end