Skip to content

Commit 4355972

Browse files
committed
Give erl_eval bindings as an orddict
Fixes error where in IEx when referencing the ~10th defined variable.
1 parent 8e3b5e3 commit 4355972

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/elixir/src/elixir_scope.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ load_binding([{Key,Value}|T], Binding, Vars, Counter) ->
122122
end,
123123
InternalName = ?atom_concat(["_@", Counter]),
124124
load_binding(T,
125-
[{InternalName,Value}|Binding],
125+
orddict:store(InternalName, Value, Binding),
126126
orddict:store(Actual, { InternalName, 0 }, Vars), Counter + 1);
127127
load_binding([], Binding, Vars, Counter) ->
128-
{ lists:reverse(Binding), Vars, Counter }.
128+
{ Binding, Vars, Counter }.
129129

130130
dump_binding(Binding, #elixir_scope{vars=Vars}) ->
131131
dump_binding(Vars, Binding, []).

0 commit comments

Comments
 (0)