Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* ext/psych/lib/psych/core_ext.rb: only extend Kernel if IRB is loaded

  in order to stop method pollution. fixes #50
  • Loading branch information...
commit 691407375f2d3bdc09f8d0f76d04feb6ed54263e 1 parent 99b4689
Aaron Patterson authored
Showing with 7 additions and 0 deletions.
  1. +5 −0 CHANGELOG.rdoc
  2. +2 −0  lib/psych/core_ext.rb
5 CHANGELOG.rdoc
View
@@ -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
2  lib/psych/core_ext.rb
View
@@ -30,6 +30,7 @@ def psych_yaml_as url
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 @@ def psych_y *objects
alias y psych_y
private :y
end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.