diff --git a/CHANGELOG.md b/CHANGELOG.md index c1b0057e..aac9fdf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Updated tzdata to fix issues with 2024b - Fix deprecation: Module.eval_quoted/4 is deprecated. Use Code.eval_quoted/3 instead - Fix deprecation: "min..max inside match is deprecated" +- Fix Duration.parse!/2 no longer ignores `parser` argument --- diff --git a/lib/parse/duration/parser.ex b/lib/parse/duration/parser.ex index 5db33c85..74652215 100644 --- a/lib/parse/duration/parser.ex +++ b/lib/parse/duration/parser.ex @@ -54,7 +54,7 @@ defmodule Timex.Parse.Duration.Parser do """ @spec parse!(String.t(), module()) :: Duration.t() | no_return def parse!(str, parser) when is_binary(str) and is_atom(parser) do - case parse(str) do + case parse(str, parser) do {:ok, d} -> d {:error, reason} when is_binary(reason) -> raise ParseError, message: reason {:error, term} -> raise ParseError, message: "#{inspect(term)}"