Skip to content

Commit ee86a5c

Browse files
author
José Valim
committed
Merge pull request #1911 from mururu/fix-pry
Use :elixir_env.ex_to_scope/1 insted of :elixir_scope.to_erl_env/1
2 parents eaebcf7 + c4ffe1b commit ee86a5c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/iex/lib/iex/server.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ defmodule IEx.Server do
221221

222222
scope =
223223
if env = opts[:env] do
224-
scope = :elixir_scope.to_erl_env(env)
224+
scope = :elixir_env.ex_to_scope(env)
225225
:elixir.scope_for_eval(scope, delegate_locals_to: locals)
226226
else
227227
:elixir.scope_for_eval(file: "iex", delegate_locals_to: locals)

lib/iex/test/iex/server_test.exs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ defmodule IEx.ServerTest do
2222
end) =~ "[:bar, :foo]"
2323
end
2424

25+
test "env option" do
26+
assert capture_io("__ENV__.file", fn ->
27+
boot([env: __ENV__])
28+
end) =~ "server_test.exs"
29+
end
30+
2531
# Take over
2632

2733
test "allows take over of the shell during boot" do

0 commit comments

Comments
 (0)