diff options
Diffstat (limited to 'ext/psych/lib/psych/core_ext.rb')
-rw-r--r-- | ext/psych/lib/psych/core_ext.rb | 5 |
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 |