ruby-changes:48831
From: mame <ko1@a...>
Date: Fri, 1 Dec 2017 09:41:22 +0900 (JST)
Subject: [ruby-changes:48831] mame:r60948 (trunk): lib/pp.rb (Kernel#pp): Fix a race condition
mame 2017-12-01 09:41:17 +0900 (Fri, 01 Dec 2017) New Revision: 60948 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60948 Log: lib/pp.rb (Kernel#pp): Fix a race condition Modified files: trunk/lib/pp.rb Index: lib/pp.rb =================================================================== --- lib/pp.rb (revision 60947) +++ lib/pp.rb (revision 60948) @@ -17,13 +17,14 @@ module Kernel https://github.com/ruby/ruby/blob/trunk/lib/pp.rb#L17 # 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/