diff --git a/lib/elixir/lib/protocol.ex b/lib/elixir/lib/protocol.ex index b2085ad2d6c..3a81ecf69a4 100644 --- a/lib/elixir/lib/protocol.ex +++ b/lib/elixir/lib/protocol.ex @@ -498,7 +498,8 @@ defmodule Protocol do defp extract_matching_by_attribute(paths, prefix, callback) do for path <- paths, - path = to_charlist(path), + # Do not use protocols as they may be consolidating + path = if(is_list(path), do: path, else: String.to_charlist(path)), file <- list_dir(path), mod = extract_from_file(path, file, prefix, callback), do: mod