diff --git a/Gemfile.lock b/Gemfile.lock index a6e8de85..70f262a5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -47,7 +47,7 @@ GEM rake rdoc semver2 - json (2.21.2) + json (3.1.0) jwt (2.10.3) base64 language_server-protocol (3.17.0.6) @@ -79,8 +79,8 @@ GEM multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - parallel (2.1.0) - parser (3.3.12.0) + parallel (2.3.0) + parser (3.3.14.0) ast (~> 2.4.1) racc power_assert (3.1.0) @@ -109,26 +109,28 @@ GEM erb psych (>= 4.0.0) tsort - regexp_parser (2.12.0) + regexp_parser (2.13.4) reline (0.6.3) io-console (~> 0.5) - rubocop (1.89.0) - json (~> 2.3) + rubocop (1.92.3) + json (>= 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) parallel (>= 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.9.3, < 3.0) + regexp_parser (>= 2.11.3, < 3.0) rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.50.0) + rubocop-ast (1.53.0) + ast (~> 2.4) parser (>= 3.3.7.2) - prism (~> 1.7) - rubocop-shopify (3.0.2) + prism (>= 1.7) + racc + rubocop-shopify (3.1.0) lint_roller - rubocop (~> 1.72, >= 1.72.1) + rubocop (~> 1.89) ruby-lsp (0.26.11) language_server-protocol (~> 3.17.0) prism (>= 1.2, < 2.0) @@ -142,9 +144,9 @@ GEM thor (1.5.0) thread_safe (0.3.6) tsort (0.2.0) - unicode-display_width (3.2.0) - unicode-emoji (~> 4.1) - unicode-emoji (4.2.0) + unicode-display_width (3.3.0) + unicode-emoji (~> 4.3) + unicode-emoji (4.3.0) PLATFORMS aarch64-linux diff --git a/lib/cldr/export/data/calendars/gregorian.rb b/lib/cldr/export/data/calendars/gregorian.rb index 13ebffe3..c6ce2c27 100644 --- a/lib/cldr/export/data/calendars/gregorian.rb +++ b/lib/cldr/export/data/calendars/gregorian.rb @@ -62,9 +62,9 @@ def elements(node, kind, context, width, options = {}) end def xpath_to_key(xpath, kind, context, width) - kind = (xpath =~ %r(/([^\/]*)Width) && Regexp.last_match(1)) || kind - context = (xpath =~ %r(Context\[@type='([^\/]*)'\]) && Regexp.last_match(1))&.underscore || context - width = (xpath =~ %r(Width\[@type='([^\/]*)'\]) && Regexp.last_match(1)) || width + kind = (xpath =~ %r(/([^/]*)Width) && Regexp.last_match(1)) || kind + context = (xpath =~ %r(Context\[@type='([^/]*)'\]) && Regexp.last_match(1))&.underscore || context + width = (xpath =~ %r(Width\[@type='([^/]*)'\]) && Regexp.last_match(1)) || width :"calendars.gregorian.#{kind}s.#{context}.#{width}" end @@ -79,7 +79,7 @@ def eras key_result = select(path).each_with_object({}) do |node, ret| if node.name == "alias" - target = (node.attribute("path").value.match(%r{/([^\/]+)$}) && Regexp.last_match(1)).gsub("era", "").gsub(/s$/, "").downcase + target = (node.attribute("path").value.match(%r{/([^/]+)$}) && Regexp.last_match(1)).gsub("era", "").gsub(/s$/, "").downcase break :"calendars.gregorian.eras.#{target}" end diff --git a/lib/cldr/format/decimal/number.rb b/lib/cldr/format/decimal/number.rb index 0f95de9d..cdab2d93 100644 --- a/lib/cldr/format/decimal/number.rb +++ b/lib/cldr/format/decimal/number.rb @@ -7,7 +7,7 @@ class Number attr_reader :prefix, :suffix, :integer_format, :fraction_format, :symbols DEFAULT_SYMBOLS = { group: ",", decimal: ".", plus_sign: "+", minus_sign: "-" }.freeze - FORMAT_PATTERN = /([^0#,\.]*)([0#,\.]+)([^0#,\.]*)$/ + FORMAT_PATTERN = /([^0#,.]*)([0#,.]+)([^0#,.]*)$/ def initialize(format, symbols = {}) @symbols = DEFAULT_SYMBOLS.merge(symbols)