File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -448,7 +448,7 @@ defmodule Protocol do
448
448
## Examples
449
449
450
450
# Get Elixir's ebin directory path and retrieve all protocols
451
- iex> path = :code.lib_dir (:elixir, : ebin)
451
+ iex> path = Application.app_dir (:elixir, " ebin" )
452
452
iex> mods = Protocol.extract_protocols([path])
453
453
iex> Enumerable in mods
454
454
true
@@ -477,7 +477,7 @@ defmodule Protocol do
477
477
## Examples
478
478
479
479
# Get Elixir's ebin directory path and retrieve all protocols
480
- iex> path = :code.lib_dir (:elixir, : ebin)
480
+ iex> path = Application.app_dir (:elixir, " ebin" )
481
481
iex> mods = Protocol.extract_impls(Enumerable, [path])
482
482
iex> List in mods
483
483
true
Original file line number Diff line number Diff line change @@ -161,13 +161,15 @@ defmodule Protocol.ConsolidationTest do
161
161
end
162
162
163
163
test "consolidation extracts protocols" do
164
- protos = Protocol . extract_protocols ( [ :code . lib_dir ( :elixir , : ebin) ] )
164
+ protos = Protocol . extract_protocols ( [ Application . app_dir ( :elixir , " ebin" ) ] )
165
165
assert Enumerable in protos
166
166
assert Inspect in protos
167
167
end
168
168
169
169
test "consolidation extracts implementations with charlist path" do
170
- protos = Protocol . extract_impls ( Enumerable , [ :code . lib_dir ( :elixir , :ebin ) ] )
170
+ protos =
171
+ Protocol . extract_impls ( Enumerable , [ to_charlist ( Application . app_dir ( :elixir , "ebin" ) ) ] )
172
+
171
173
assert List in protos
172
174
assert Function in protos
173
175
end
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ defmodule IEx.HelpersTest do
144
144
describe "open" do
145
145
@ iex_helpers "iex/lib/iex/helpers.ex"
146
146
@ elixir_erl "elixir/src/elixir.erl"
147
- @ lists_erl " #{ :code . lib_dir ( :stdlib , : src) } /lists.erl"
147
+ @ lists_erl Application . app_dir ( :stdlib , " src/lists.erl")
148
148
@ httpc_erl "src/http_client/httpc.erl"
149
149
@ editor System . get_env ( "ELIXIR_EDITOR" )
150
150
You can’t perform that action at this time.
0 commit comments