Skip to content

Commit 3309010

Browse files
authored
Lint: Fix Style/ConditionalAssignment (#1180)
1 parent 86f5827 commit 3309010

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/money/currency.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,12 @@ def inherit(parent_iso_code, curr)
196196
# @return [Boolean] true if the currency previously existed, false
197197
# if it didn't.
198198
def unregister(curr)
199-
if curr.is_a?(Hash)
200-
key = curr.fetch(:iso_code).downcase.to_sym
201-
else
202-
key = curr.downcase.to_sym
203-
end
199+
key =
200+
if curr.is_a?(Hash)
201+
curr.fetch(:iso_code).downcase.to_sym
202+
else
203+
curr.downcase.to_sym
204+
end
204205
existed = @table.delete(key)
205206
@stringified_keys = nil if existed
206207
existed ? true : false

0 commit comments

Comments
 (0)