@@ -190,10 +190,10 @@ defmodule Code do
190
190
defp unpack_ast ( line , forms ) , do: { :__block__ , [ line: line ] , forms }
191
191
192
192
@ 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.
197
197
198
198
Notice that if `load_file` is invoked by different processes
199
199
concurrently, the target file will be invoked concurrently
@@ -211,8 +211,8 @@ defmodule Code do
211
211
212
212
@ doc """
213
213
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.
216
216
217
217
Notice that if `require_file` is invoked by different processes concurrently,
218
218
the first process to invoke `require_file` acquires a lock and the remaining
0 commit comments