Skip to content

Commit 5e64033

Browse files
committed
Update the docs for Code.load_file and Code.require_file
1 parent 99c7d84 commit 5e64033

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/elixir/lib/code.ex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ defmodule Code do
190190
defp unpack_ast(line, forms), do: { :__block__, [line: line], forms }
191191

192192
@doc """
193-
Loads the given `file`. Accepts `relative_to` as an argument
194-
to tell where the file is located. If the file was already
195-
required/loaded, loads it again. It returns all the modules
196-
defined in the file.
193+
Loads the given `file`. Accepts `relative_to` as an argument to tell where
194+
the file is located. If the file was already required/loaded, loads it again.
195+
It returns a list of tuples { ModuleName, <<byte_code>> }, one tuple for each
196+
module defined in the file.
197197
198198
Notice that if `load_file` is invoked by different processes
199199
concurrently, the target file will be invoked concurrently
@@ -211,8 +211,8 @@ defmodule Code do
211211

212212
@doc """
213213
Requires the given `file`. Accepts `relative_to` as an argument to tell where
214-
the file is located. It returns all the modules defined in the file. If the
215-
file was already required/loaded, doesn't do anything and returns nil.
214+
the file is located. The return value is the same as that of `load_file`. If
215+
the file was already required/loaded, doesn't do anything and returns nil.
216216
217217
Notice that if `require_file` is invoked by different processes concurrently,
218218
the first process to invoke `require_file` acquires a lock and the remaining

0 commit comments

Comments
 (0)