summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.rdoc5
-rw-r--r--lib/psych/core_ext.rb2
2 files changed, 7 insertions, 0 deletions
diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc
index 728f6ce..599fbed 100644
--- a/CHANGELOG.rdoc
+++ b/CHANGELOG.rdoc
@@ -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 Feb 28 10:28:51 2012 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/lib/psych.rb: default open YAML files with utf8 external
diff --git a/lib/psych/core_ext.rb b/lib/psych/core_ext.rb
index 2ad75e1..4a04c2d 100644
--- a/lib/psych/core_ext.rb
+++ b/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