diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-11-16 18:30:14 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-11-16 18:30:14 -0800 |
commit | 4c724549f98317e098502a04162d518d25df7aea (patch) | |
tree | 43763dc3568560b38accc5112811898c2c78d980 | |
parent | 920cb81f6c6d9ce57c51a6df8fdc99b0d00f4c3a (diff) | |
download | psych-4c724549f98317e098502a04162d518d25df7aea.zip |
* 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
r37694
-rw-r--r-- | CHANGELOG.rdoc | 7 | ||||
-rw-r--r-- | lib/psych/core_ext.rb | 9 | ||||
-rw-r--r-- | lib/psych/y.rb | 7 |
3 files changed, 15 insertions, 8 deletions
diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc index 8a8e03e..b0c20fb 100644 --- a/CHANGELOG.rdoc +++ b/CHANGELOG.rdoc @@ -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 + Tue Nov 6 09:37:57 2012 NARUSE, Yui <naruse@ruby-lang.org> * ruby.c (load_file_internal): set default source encoding as diff --git a/lib/psych/core_ext.rb b/lib/psych/core_ext.rb index 4a04c2d..9c8134d 100644 --- a/lib/psych/core_ext.rb +++ b/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/lib/psych/y.rb b/lib/psych/y.rb new file mode 100644 index 0000000..f20d2e2 --- /dev/null +++ b/lib/psych/y.rb @@ -0,0 +1,7 @@ +module Kernel + def y *objects + puts Psych.dump_stream(*objects) + end + private :y +end + |