Skip to content

Commit 6b2b928

Browse files
committed
Fix IEx's module source lookup
Module.module_info(:compile)[:source] returns the value, not a tuple as the code was expecting, making r/1 think that no module has a source. Fix this expectation.
1 parent 7cd98e1 commit 6b2b928

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/iex/lib/iex/helpers.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ defmodule IEx.Helpers do
286286
source = module.module_info(:compile)[:source]
287287

288288
case source do
289-
{ :source, source } -> list_to_binary(source)
290-
_ -> nil
289+
nil -> nil
290+
source -> list_to_binary(source)
291291
end
292292
end
293293

0 commit comments

Comments
 (0)