diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-01 00:41:17 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-01 00:41:17 +0000 |
commit | 4ae87f0ad60e141a83c8c53ff76298adf1eae8f5 (patch) | |
tree | 39389572fa0d4081838483d4caa4a6ddb7a45ac2 /lib/pp.rb | |
parent | faae29f869b803f7c3b0f248e6f6ad50565754e8 (diff) | |
download | ruby-4ae87f0ad60e141a83c8c53ff76298adf1eae8f5.tar.gz |
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
Diffstat (limited to 'lib/pp.rb')
-rw-r--r-- | lib/pp.rb | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |