From 17e1f238d123e089230decbcad52b7b87cd15c7f Mon Sep 17 00:00:00 2001 From: Christopher Pruijsen Date: Sun, 13 Sep 2026 09:15:06 +0000 Subject: [PATCH] Use null subunit for non-ISO currencies without a subunit XFU and GBX defined subunit as an empty string in currency_non_iso.yml, while currencies without a subunit in currency_iso.yml (e.g. JPY) leave subunit null. Align the non-ISO entries with that convention. Fixes Shopify/money#353 --- config/currency_non_iso.yml | 4 ++-- spec/currency/loader_spec.rb | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/currency_non_iso.yml b/config/currency_non_iso.yml index 76ae662e..d0960ab0 100644 --- a/config/currency_non_iso.yml +++ b/config/currency_non_iso.yml @@ -71,7 +71,7 @@ xfu: symbol: '' disambiguate_symbol: XFU alternate_symbols: [] - subunit: '' + subunit: subunit_to_unit: 100 symbol_first: true html_entity: '' @@ -86,7 +86,7 @@ gbx: symbol: '' disambiguate_symbol: GBX alternate_symbols: [] - subunit: '' + subunit: subunit_to_unit: 1 symbol_first: true html_entity: '' diff --git a/spec/currency/loader_spec.rb b/spec/currency/loader_spec.rb index 7e2ea6e5..0bd4b6bc 100644 --- a/spec/currency/loader_spec.rb +++ b/spec/currency/loader_spec.rb @@ -14,6 +14,7 @@ it 'loads the non iso currency file' do expect(subject.load_currencies['jep']['iso_code']).to eq('JEP') + expect(subject.load_currencies['xfu']['subunit']).to be_nil end it 'loads the historic iso currency file' do