Skip to content

Commit 717c72e

Browse files
author
José Valim
committed
Ensure module is loaded before function exported check
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
1 parent 9ac830f commit 717c72e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/iex/lib/iex/autocomplete.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ defmodule IEx.Autocomplete do
5555

5656
@doc false
5757
def exports(mod) do
58-
if function_exported?(mod, :__info__, 1) do
58+
if Code.ensure_loaded?(mod) and function_exported?(mod, :__info__, 1) do
5959
mod.__info__(:macros) ++ (mod.__info__(:functions) -- [__info__: 1])
6060
else
61-
mod.module_info(:exports)
61+
mod.module_info(:exports) -- [module_info: 0, module_info: 1]
6262
end
6363
end
6464

0 commit comments

Comments
 (0)