Skip to content

Commit ce0ea00

Browse files
committed
Lint: Fix Style/CaseEquality
1 parent f88a249 commit ce0ea00

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
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/money.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def self.disallow_currency_conversion!
314314
#
315315
# @see #initialize
316316
def self.from_amount(amount, currency = default_currency, options = {})
317-
raise ArgumentError, "'amount' must be numeric" unless Numeric === amount
317+
raise ArgumentError, "'amount' must be numeric" unless amount.is_a?(Numeric)
318318

319319
currency = Currency.wrap(currency) || Money.default_currency
320320
raise Currency::NoCurrency, "must provide a currency" if currency.nil?

lib/money/money/formatter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def lookup_default(key)
339339

340340
def symbol_value_from(rules)
341341
if rules.has_key?(:symbol)
342-
if rules[:symbol] === true
342+
if rules[:symbol] == true
343343
if rules[:disambiguate] && currency.disambiguate_symbol
344344
currency.disambiguate_symbol
345345
else

0 commit comments

Comments
 (0)