diff --git a/CHANGELOG.md b/CHANGELOG.md index 519ff8fabe..f263234596 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- Fix the symbols for IQD (Iraqi Dinar) and LYD (Libyan Dinar), which had their letters in reverse order: "د.ع" and "د.ل", like BHD in #958 - Fix `Money::Allocation.generate` converting a Rational with unlimited `to_d` precision. It now uses `Money.conversion_precision` - Fix `Money::Currency.reset!` keeping the cached key set, so a currency registered before the reset was still accepted by `Money::Currency.new` and raised `NoMethodError` instead of `UnknownCurrency` - Fix `Money::Bank::VariableExchange#import_rates` parsing `:json` with `JSON.load`, which instantiates any class named by a `json_class` key; it now uses `JSON.parse` diff --git a/config/currency_iso.json b/config/currency_iso.json index e13b4a605a..6119be9348 100644 --- a/config/currency_iso.json +++ b/config/currency_iso.json @@ -1003,7 +1003,7 @@ "priority": 100, "iso_code": "IQD", "name": "Iraqi Dinar", - "symbol": "ع.د", + "symbol": "د.ع", "alternate_symbols": [], "subunit": "Fils", "subunit_to_unit": 1000, @@ -1320,7 +1320,7 @@ "priority": 100, "iso_code": "LYD", "name": "Libyan Dinar", - "symbol": "ل.د", + "symbol": "د.ل", "alternate_symbols": ["LD"], "subunit": "Dirham", "subunit_to_unit": 1000, diff --git a/spec/money/formatting_spec.rb b/spec/money/formatting_spec.rb index 4271b5b26a..96fb2e755e 100644 --- a/spec/money/formatting_spec.rb +++ b/spec/money/formatting_spec.rb @@ -135,6 +135,11 @@ expect(Money.new(10_00, "BHD").format).to eq "د.ب1.000" end + it "writes Arabic dinar symbols starting with dal, like BHD" do + expect(Money.new(10_000, "IQD").format).to eq "10.000 د.ع" + expect(Money.new(10_000, "LYD").format).to eq "10.000 د.ل" + end + context "when :subunit_to_unit is 1" do it "does not display a decimal part" do expect(Money.new(10_00, "VUV").format).to eq "Vt1,000"