We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6eca976 commit 3eb94a4Copy full SHA for 3eb94a4
lib/iex/lib/iex/helpers.ex
@@ -523,7 +523,10 @@ defmodule IEx.Helpers do
523
:code.get_path()
524
|> Protocol.extract_protocols()
525
|> Enum.uniq()
526
- |> Enum.reject(fn protocol -> is_nil(protocol.impl_for(term)) end)
+ |> Enum.filter(fn protocol ->
527
+ Code.ensure_loaded?(protocol) and function_exported?(protocol, :impl_for, 1) and
528
+ protocol.impl_for(term) != nil
529
+ end)
530
|> Enum.sort()
531
|> Enum.map_join(", ", &inspect/1)
532
end
0 commit comments