From 62ffffbe25a7a61a825f5b04399b9250f1af5ec0 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Mon, 5 Mar 2012 17:32:53 +0000 Subject: * 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 --- ext/psych/lib/psych/core_ext.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/psych/lib/psych/core_ext.rb') 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 -- cgit v1.2.3