Corrected with rubocop cop 'Style/EachWithObject'.

This commit is contained in:
Thorsten Eckel 2015-05-05 16:56:12 +02:00
parent 492c07cd95
commit bfa6f11221
2 changed files with 1 additions and 4 deletions

View file

@ -236,8 +236,6 @@ Metrics/BlockNesting:
Enabled: false
Lint/RescueException:
Enabled: false
Style/EachWithObject:
Enabled: false
Style/PredicateName:
Enabled: false
Style/ClassVars:

View file

@ -602,7 +602,7 @@ returns
end
def self.symbolize_keys(hash)
hash.inject({}) {|result, (key, value)|
hash.each_with_object({}) {|(key, value), result|
new_key = case key
when String then key.to_sym
else key
@ -612,7 +612,6 @@ returns
else value
end
result[new_key] = new_value
result
}
end