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
|
Enabled: false
|
||||||
Lint/RescueException:
|
Lint/RescueException:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/EachWithObject:
|
|
||||||
Enabled: false
|
|
||||||
Style/PredicateName:
|
Style/PredicateName:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/ClassVars:
|
Style/ClassVars:
|
||||||
|
|
|
@ -602,7 +602,7 @@ returns
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.symbolize_keys(hash)
|
def self.symbolize_keys(hash)
|
||||||
hash.inject({}) {|result, (key, value)|
|
hash.each_with_object({}) {|(key, value), result|
|
||||||
new_key = case key
|
new_key = case key
|
||||||
when String then key.to_sym
|
when String then key.to_sym
|
||||||
else key
|
else key
|
||||||
|
@ -612,7 +612,6 @@ returns
|
||||||
else value
|
else value
|
||||||
end
|
end
|
||||||
result[new_key] = new_value
|
result[new_key] = new_value
|
||||||
result
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue