diff options
author | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2014-05-31 22:59:38 +0530 |
---|---|---|
committer | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2014-05-31 22:59:38 +0530 |
commit | 79b88e0d99f39c11d4c11fcd340fdebff60cde30 (patch) | |
tree | 0db1b51b0b0c2a1c5f70834822d7b1a67d5be0d0 | |
parent | b1867187d46eb82763242818af52cd452fdff5fe (diff) | |
download | rails-79b88e0d99f39c11d4c11fcd340fdebff60cde30.tar.gz rails-79b88e0d99f39c11d4c11fcd340fdebff60cde30.tar.bz2 rails-79b88e0d99f39c11d4c11fcd340fdebff60cde30.zip |
[ci skip] Correct output of Hash#symbolize_keys
-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 |