Skip to content

Commit 32ed2c3

Browse files
committed
Remove Regex warning until Erlang/OTP 28.1
1 parent ad524f5 commit 32ed2c3

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/elixir/lib/kernel.ex

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3815,13 +3815,7 @@ defmodule Kernel do
38153815
do_at_escape(name, doc)
38163816

38173817
%{__struct__: Regex, source: source, opts: opts} = regex ->
3818-
# TODO: Remove this in Elixir v2.0
3819-
IO.warn(
3820-
"storing and reading regexes from module attributes is deprecated, " <>
3821-
"inline the regex inside the function definition instead",
3822-
env
3823-
)
3824-
3818+
# TODO: Automatically deal with exported regexes
38253819
case :erlang.system_info(:otp_release) < [?2, ?8] do
38263820
true -> do_at_escape(name, regex)
38273821
false -> quote(do: Regex.compile!(unquote(source), unquote(opts)))

0 commit comments

Comments
 (0)