diff options
author | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2012-01-04 14:15:11 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2012-01-04 14:15:11 -0300 |
commit | 25c76ec8e2e17cc3eb42a824c38f78fb9e23e70a (patch) | |
tree | 84a5d9c36aa966a7a101c6d495143184f2567c47 | |
parent | ae7dcb4bec3dd274c8773503bc68513c01dae6ff (diff) | |
download | rails-25c76ec8e2e17cc3eb42a824c38f78fb9e23e70a.tar.gz rails-25c76ec8e2e17cc3eb42a824c38f78fb9e23e70a.tar.bz2 rails-25c76ec8e2e17cc3eb42a824c38f78fb9e23e70a.zip |
No need to override to_yaml method in ActiveSupport::OrderedHash
-rw-r--r-- | activesupport/lib/active_support/ordered_hash.rb | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb index 7fd4168363..8edd3960c7 100644 --- a/activesupport/lib/active_support/ordered_hash.rb +++ b/activesupport/lib/active_support/ordered_hash.rb @@ -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 |