Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[ci skip] Correct output of Hash#symbolize_keys

  • Loading branch information...
commit 79b88e0d99f39c11d4c11fcd340fdebff60cde30 1 parent b186718
Akshay Vishnoi akshay-vishnoi authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/core_ext/hash/keys.rb
4 activesupport/lib/active_support/core_ext/hash/keys.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.