From 10c9ed249320165a4a8ec2f70cade2f1c90f2bcd Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 5 Apr 2010 04:12:14 +0000 Subject: * ext/psych/lib/psych/core_ext.rb: remove before alias. * ext/syck/lib/syck.rb: don't warn called by itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/psych/lib/psych/core_ext.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (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 bd22219c07..9c55c707a1 100644 --- a/ext/psych/lib/psych/core_ext.rb +++ b/ext/psych/lib/psych/core_ext.rb @@ -12,11 +12,14 @@ class Object def psych_to_yaml options = {} Psych.dump self, options end + remove_method :to_yaml rescue nil alias :to_yaml :psych_to_yaml end module Kernel - def y *objects + def psych_y *objects puts Psych.dump_stream(*objects) end + remove_method :y rescue nil + alias y psych_y end -- cgit v1.2.3