summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-05 17:32:53 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-05 17:32:53 +0000
commit62ffffbe25a7a61a825f5b04399b9250f1af5ec0 (patch)
treee1ce557f8bd9ef388100cfbb7f35b3a432ef628a
parentc46bdadb84bec5fd4484e4375e2935d740984618 (diff)
* ext/psych/lib/psych/core_ext.rb: only extend Kernel if IRB is loaded
in order to stop method pollution. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/psych/lib/psych/core_ext.rb2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 13af8b61c9..dc0c3b837b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Mar 6 02:31:20 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych/core_ext.rb: only extend Kernel if IRB is loaded
+ in order to stop method pollution.
+
Tue Mar 6 01:34:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (block_call): rules for block_call after block_call.
diff --git a/ext/psych/lib/psych/core_ext.rb b/ext/psych/lib/psych/core_ext.rb
index 2ad75e1661..4a04c2d128 100644
--- a/ext/psych/lib/psych/core_ext.rb
+++ b/ext/psych/lib/psych/core_ext.rb
@@ -30,6 +30,7 @@ class Module
alias :yaml_as :psych_yaml_as
end
+if defined?(::IRB)
module Kernel
def psych_y *objects
puts Psych.dump_stream(*objects)
@@ -38,3 +39,4 @@ module Kernel
alias y psych_y
private :y
end
+end