Permalink
Browse files

Merge pull request #15448 from akshay-vishnoi/doc_changes

[ci skip] Correct output of Hash#symbolize_keys
  • Loading branch information...
2 parents 4d83c2a + 79b88e0 commit ccda54a925059ba0a087f8d3d72586fb290e1b8a @carlosantoniodasilva carlosantoniodasilva committed May 31, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/core_ext/hash/keys.rb
@@ -27,7 +27,7 @@ def transform_keys!
# hash = { name: 'Rob', age: '28' }
#
# hash.stringify_keys
- # # => { "name" => "Rob", "age" => "28" }
+ # # => {"name"=>"Rob", "age"=>"28"}
def stringify_keys
transform_keys{ |key| key.to_s }
end
@@ -44,7 +44,7 @@ def stringify_keys!
# hash = { 'name' => 'Rob', 'age' => '28' }
#
# hash.symbolize_keys
- # # => { name: "Rob", age: "28" }
+ # # => {:name=>"Rob", :age=>"28"}
def symbolize_keys
transform_keys{ |key| key.to_sym rescue key }
end

0 comments on commit ccda54a

Please sign in to comment.