File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -3727,15 +3727,19 @@ defmodule Kernel do
37273727          { _ ,  doc }  when  doc_attr?  -> 
37283728            do_at_escape ( name ,  doc ) 
37293729
3730-           % { __struct__:  Regex ,  source:  source ,  opts:  opts }  -> 
3730+           % { __struct__:  Regex ,  source:  source ,  opts:  opts }  =   regex   -> 
37313731            # TODO: Remove this in Elixir v2.0 
37323732            IO . warn ( 
37333733              "storing and reading regexes from module attributes is deprecated, "  <> 
37343734                "inline the regex inside the function definition instead" , 
37353735              env 
37363736            ) 
37373737
3738-             quote ( do:  Regex . compile! ( unquote ( source ) ,  unquote ( opts ) ) ) 
3738+             if  :erlang . system_info ( :otp_release )  <  [ ?2 ,  ?8 ]  do 
3739+               do_at_escape ( name ,  regex ) 
3740+             else 
3741+               quote ( do:  Regex . compile! ( unquote ( source ) ,  unquote ( opts ) ) ) 
3742+             end  
37393743
37403744          value  -> 
37413745            do_at_escape ( name ,  value ) 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments