File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -3523,20 +3523,16 @@ defmodule Kernel do
3523
3523
defp build_cond_clauses ( [ ] , acc ) , do: acc
3524
3524
3525
3525
defp split_words ( string , modifiers ) do
3526
- quote do
3527
- mod = case unquote ( modifiers ) do
3528
- [ ] -> ?b
3529
- [ mod ] when mod in [ ?b , ?a , ?c ] -> mod
3530
- _else -> raise ArgumentError , message: "modifier must be one of: b, a, c"
3531
- end
3532
-
3533
- parts = String . split ( unquote ( string ) )
3526
+ mod = case modifiers do
3527
+ [ ] -> ?b
3528
+ [ mod ] when mod in [ ?b , ?a , ?c ] -> mod
3529
+ _else -> raise ArgumentError , message: "modifier must be one of: b, a, c"
3530
+ end
3534
3531
3535
- case mod do
3536
- ?b -> parts
3537
- ?a -> lc p inlist parts , do: binary_to_atom ( p )
3538
- ?c -> lc p inlist parts , do: binary_to_list ( p )
3539
- end
3532
+ case mod do
3533
+ ?b -> quote do: String . split ( unquote ( string ) )
3534
+ ?a -> quote do: lc p inlist String . split ( unquote ( string ) ) , do: binary_to_atom ( p )
3535
+ ?c -> quote do: lc p inlist String . split ( unquote ( string ) ) , do: :unicode . characters_to_list ( p )
3540
3536
end
3541
3537
end
3542
3538
end
You can’t perform that action at this time.
0 commit comments