Corrected with rubocop cop 'Style/EachWithObject'.
This commit is contained in:
parent
492c07cd95
commit
bfa6f11221
2 changed files with 1 additions and 4 deletions
|
@ -236,8 +236,6 @@ Metrics/BlockNesting:
|
|||
Enabled: false
|
||||
Lint/RescueException:
|
||||
Enabled: false
|
||||
Style/EachWithObject:
|
||||
Enabled: false
|
||||
Style/PredicateName:
|
||||
Enabled: false
|
||||
Style/ClassVars:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue