提交 85c56b01 编写于 作者: R Rafael Mendonça França

Merge pull request #6493 from markmcspadden/hash_keys_order_methods

Reorder deep_symbolize_keys methods
......@@ -104,17 +104,17 @@ def deep_stringify_keys!
deep_transform_keys!{ |key| key.to_s }
end
# Destructively convert all keys to symbols, as long as they respond
# to +to_sym+. This includes the keys from the root hash and from all
# nested hashes.
def deep_symbolize_keys!
deep_transform_keys!{ |key| key.to_sym rescue key }
end
# Return a new hash with all keys converted to symbols, as long as
# they respond to +to_sym+. This includes the keys from the root hash
# and from all nested hashes.
def deep_symbolize_keys
deep_transform_keys{ |key| key.to_sym rescue key }
end
# Destructively convert all keys to symbols, as long as they respond
# to +to_sym+. This includes the keys from the root hash and from all
# nested hashes.
def deep_symbolize_keys!
deep_transform_keys!{ |key| key.to_sym rescue key }
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册