summaryrefslogtreecommitdiff
path: root/ext/psych
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-05 04:12:14 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-05 04:12:14 +0000
commit10c9ed249320165a4a8ec2f70cade2f1c90f2bcd (patch)
treeab949ca98b56dabeaef3f450ae509f719aea0ef9 /ext/psych
parentf1c86c1bb22e7b999449cee398e0e804f21ea18f (diff)
* 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
Diffstat (limited to 'ext/psych')
-rw-r--r--ext/psych/lib/psych/core_ext.rb5
1 files changed, 4 insertions, 1 deletions
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