diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-05-31 14:57:21 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-05-31 14:57:21 -0300 |
commit | ccda54a925059ba0a087f8d3d72586fb290e1b8a (patch) | |
tree | 12c022243f34b7a9d46d88d856b455d7918e3929 /activesupport/lib | |
parent | 4d83c2a27fb5bea5ccba468aaad4a9038a83b2b8 (diff) | |
parent | 79b88e0d99f39c11d4c11fcd340fdebff60cde30 (diff) | |
download | rails-ccda54a925059ba0a087f8d3d72586fb290e1b8a.tar.gz rails-ccda54a925059ba0a087f8d3d72586fb290e1b8a.tar.bz2 rails-ccda54a925059ba0a087f8d3d72586fb290e1b8a.zip |
Merge pull request #15448 from akshay-vishnoi/doc_changes
[ci skip] Correct output of Hash#symbolize_keys
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/keys.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/keys.rb b/activesupport/lib/active_support/core_ext/hash/keys.rb index 28536e32a4..5934c578ea 100644 --- a/activesupport/lib/active_support/core_ext/hash/keys.rb +++ b/activesupport/lib/active_support/core_ext/hash/keys.rb @@ -27,7 +27,7 @@ class Hash # 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 @@ class Hash # 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 |