From 4e57f4e1826ff6f1f3b3c3ffb78132b448b732f9 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Sat, 17 Nov 2012 02:28:48 +0000 Subject: [PATCH] * ext/psych/lib/psych/core_ext.rb: move Kernel#y so that it can manually be required as 'psych/y'. * ext/psych/lib/psych/y.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ ext/psych/lib/psych/core_ext.rb | 9 +-------- ext/psych/lib/psych/y.rb | 7 +++++++ 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 ext/psych/lib/psych/y.rb diff --git a/ChangeLog b/ChangeLog index 2b8d51812d..8508ff5ea1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Nov 17 11:26:36 2012 Aaron Patterson + + * ext/psych/lib/psych/core_ext.rb: move Kernel#y so that it can + manually be required as 'psych/y'. + + * ext/psych/lib/psych/y.rb: ditto + Sat Nov 17 08:13:48 2012 Benoit Daloze * lib/abbrev.rb: fix r37113. Correct examples, fix style diff --git a/ext/psych/lib/psych/core_ext.rb b/ext/psych/lib/psych/core_ext.rb index 4a04c2d128..9c8134da7e 100644 --- a/ext/psych/lib/psych/core_ext.rb +++ b/ext/psych/lib/psych/core_ext.rb @@ -31,12 +31,5 @@ class Module end if defined?(::IRB) -module Kernel - def psych_y *objects - puts Psych.dump_stream(*objects) - end - remove_method :y rescue nil - alias y psych_y - private :y -end + require 'psych/y' end diff --git a/ext/psych/lib/psych/y.rb b/ext/psych/lib/psych/y.rb new file mode 100644 index 0000000000..f20d2e2a66 --- /dev/null +++ b/ext/psych/lib/psych/y.rb @@ -0,0 +1,7 @@ +module Kernel + def y *objects + puts Psych.dump_stream(*objects) + end + private :y +end +