Skip to content

Commit

Permalink
Fix Cldr.LanguageTag.Sigil.sigil_l/2 for Elixir 1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Aug 28, 2022
1 parent ed20763 commit 1dc5bf1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### Bug Fixes

* Fixes a bug in `Cldr.LanguageTag.Sigil.sigil_l/2`. With the changes in metadata structure for Elixir 14 a pattern match was failing. The pattern is now fixed and is backwards compatible with earlier Elixir versions.

## Cldr v2.33.1

This is the changelog for Cldr v2.33.1 released on August 20th, 2022. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr/tags)
Expand Down
4 changes: 2 additions & 2 deletions lib/cldr/config/rbnf_config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ defmodule Cldr.Rbnf.Config do
[:af, :ak, :am, :ar, :az, :be, :bg, :bs, :ca, :ccp, :chr, :cs, :cy, :da, :de,
:"de-CH", :ee, :el, :en, :"en-IN", :eo, :es, :"es-419", :et, :fa, :"fa-AF",
:ff, :fi, :fil, :fo, :fr, :"fr-BE", :"fr-CH", :ga, :he, :hi, :hr, :hu, :hy,
:id, :is, :it, :ja, :ka, :kl, :km, :ko, :ky, :lb, :lo, :lrc, :lt, :lv, :mk,
:id, :is, :it, :ja, :ka, :kk, :kl, :km, :ko, :ky, :lb, :lo, :lrc, :lt, :lv, :mk,
:ms, :mt, :my, :ne, :nl, :nn, :no, :pl, :pt, :"pt-PT", :qu, :ro, :ru, :se, :sk,
:sl, :sq, :sr, :"sr-Latn", :su, :sv, :sw, :ta, :th, :tr, :uk, :und, :vi, :yue,
:"yue-Hans", :zh, :"zh-Hant"]
Expand Down Expand Up @@ -73,7 +73,7 @@ defmodule Cldr.Rbnf.Config do
[:af, :ak, :am, :ar, :az, :be, :bg, :bs, :ca, :ccp, :chr, :cs, :cy, :da, :de,
:"de-CH", :ee, :el, :en, :"en-IN", :eo, :es, :"es-419", :et, :fa, :"fa-AF",
:ff, :fi, :fil, :fo, :fr, :"fr-BE", :"fr-CH", :ga, :he, :hi, :hr, :hu, :hy,
:id, :is, :it, :ja, :ka, :kl, :km, :ko, :ky, :lb, :lo, :lrc, :lt, :lv, :mk,
:id, :is, :it, :ja, :ka, :kk, :kl, :km, :ko, :ky, :lb, :lo, :lrc, :lt, :lv, :mk,
:ms, :mt, :my, :ne, :nl, :nn, :no, :pl, :pt, :"pt-PT", :qu, :ro, :ru, :se, :sk,
:sl, :sq, :sr, :"sr-Latn", :su, :sv, :sw, :ta, :th, :tr, :uk, :vi, :yue,
:"yue-Hans", :zh, :"zh-Hant"]
Expand Down
4 changes: 2 additions & 2 deletions lib/cldr/language_tag/sigil.ex
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ defmodule Cldr.LanguageTag.Sigil do
"""
defmacro sigil_l(locale_name, 'u') do
{:<<>>, [_], [locale_name]} = locale_name
{:<<>>, _, [locale_name]} = locale_name

case parse_locale(String.split(locale_name, "|")) do
{:ok, locale_name} ->
Expand All @@ -53,7 +53,7 @@ defmodule Cldr.LanguageTag.Sigil do
end

defmacro sigil_l(locale_name, _opts) do
{:<<>>, [_], [locale_name]} = locale_name
{:<<>>, _, [locale_name]} = locale_name

case validate_locale(String.split(locale_name, "|")) do
{:ok, locale_name} ->
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Cldr.Mixfile do
use Mix.Project

@version "2.33.1"
@version "2.33.2"

def project do
[
Expand Down
1 change: 1 addition & 0 deletions mix/support/units/expression.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Protocol.derive(Jason.Encoder, Ratio)

defmodule Cldr.Unit.Expression do
@moduledoc false
@dialyzer {:nowarn_function, run: 2}

def run("", _constants) do
0
Expand Down

0 comments on commit 1dc5bf1

Please sign in to comment.