File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -6657,7 +6657,17 @@ defmodule Kernel do
6657
6657
# TODO: Remove this when we require Erlang/OTP 28.1+
6658
6658
is_binary ( binary_or_tuple ) and Code . ensure_loaded? ( :re ) and
6659
6659
function_exported? ( :re , :import , 1 ) ->
6660
- Macro . escape ( Regex . compile_export! ( binary_or_tuple , bin_opts ) )
6660
+ % { re_pattern: exported_pattern , re_version: re_version , source: source , opts: opts } =
6661
+ Regex . compile_export! ( binary_or_tuple , bin_opts )
6662
+
6663
+ quote do
6664
+ % Regex {
6665
+ re_pattern: :re . import ( unquote ( exported_pattern ) ) ,
6666
+ re_version: unquote ( re_version ) ,
6667
+ source: unquote ( source ) ,
6668
+ opts: unquote ( opts )
6669
+ }
6670
+ end
6661
6671
6662
6672
true ->
6663
6673
quote ( do: Regex . compile! ( unquote ( binary_or_tuple ) , unquote ( bin_opts ) ) )
You can’t perform that action at this time.
0 commit comments