No need to override to_yaml method in ActiveSupport::OrderedHash

This commit is contained in:
Rafael Mendonça França 2012-01-04 14:15:11 -03:00
parent ae7dcb4bec
commit 25c76ec8e2
1 changed files with 0 additions and 15 deletions

View File

@ -1,4 +1,3 @@
require 'psych'
require 'yaml'
YAML.add_builtin_type("omap") do |type, val|
@ -25,20 +24,6 @@ module ActiveSupport
coder.represent_seq '!omap', map { |k,v| { k => v } }
end
def to_yaml(opts = {})
if !YAML::ENGINE.syck?
return super
end
YAML.quick_emit(self, opts) do |out|
out.seq(taguri) do |seq|
each do |k, v|
seq.add(k => v)
end
end
end
end
def nested_under_indifferent_access
self
end