Skip to content

Commit 880ae11

Browse files
committed
Don't wrap Code.require_file
1 parent 6892311 commit 880ae11

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

lib/iex/lib/iex.ex

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,14 @@ defmodule IEx do
209209
#
210210
# Sample contents of a local .iex file:
211211
#
212-
# IEx.source "~/.iex" # source another .iex file
213-
# IO.puts "hello world" # print something before the shell starts
214-
# value = 13 # bind a variable that'll be accessible in the shell
212+
# # source another .iex file, ~/.iex in this case
213+
# Code.require_file ".iex", "~"
214+
#
215+
# # print something before the shell starts
216+
# IO.puts "hello world"
217+
#
218+
# # bind a variable that'll be accessible in the shell
219+
# value = 13
215220
#
216221
# Running the shell then results in
217222
#
@@ -245,15 +250,4 @@ defmodule IEx do
245250
end
246251
end
247252
end
248-
249-
@doc """
250-
Convenience function for use in .iex files. Converts `path` to an absolute
251-
path (also expanding ~ if present) and requires the file at resulting path.
252-
253-
In case of an error, prints exception info to stdout and terminates the shell.
254-
"""
255-
def source(path) do
256-
p = Path.expand(path)
257-
Code.require_file(p)
258-
end
259253
end

0 commit comments

Comments
 (0)