Skip to content

Commit 04aabf9

Browse files
committed
Fix Ruby unused variable warning
This patch fixes the following warning: ```shell monetize-1.13.0/lib/monetize/parser.rb:129: warning: assigned but unused variable - possible_major ```
1 parent 549ace4 commit 04aabf9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Current
44
- Fix parsing multiple delimeters in the amount, after BigDecimal updates
5+
- Fix unused variable `possible_major` Ruby warning.
56

67
## 1.13.0
78
- **Breaking change**: check ISO currency code validity when parsing strings with `to_money`

lib/monetize/parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def minor_has_correct_dp_for_currency_subunit?(minor, currency)
127127

128128
def extract_major_minor_with_single_delimiter(num, currency, delimiter)
129129
if expect_whole_subunits?
130-
possible_major, possible_minor = split_major_minor(num, delimiter)
130+
_possible_major, possible_minor = split_major_minor(num, delimiter)
131131
if minor_has_correct_dp_for_currency_subunit?(possible_minor, currency)
132132
split_major_minor(num, delimiter)
133133
else

0 commit comments

Comments
 (0)