* 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
This commit is contained in:
tenderlove 2012-11-17 02:28:48 +00:00
parent 5bab434018
commit 4e57f4e182
3 changed files with 15 additions and 8 deletions

View File

@ -1,3 +1,10 @@
Sat Nov 17 11:26:36 2012 Aaron Patterson <aaron@tenderlovemaking.com>
* 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 <eregontp@gmail.com>
* lib/abbrev.rb: fix r37113. Correct examples, fix style

View File

@ -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

7
ext/psych/lib/psych/y.rb Normal file
View File

@ -0,0 +1,7 @@
module Kernel
def y *objects
puts Psych.dump_stream(*objects)
end
private :y
end