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
448448 ## Examples
449449
450450 # 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" )
452452 iex> mods = Protocol.extract_protocols([path])
453453 iex> Enumerable in mods
454454 true
@@ -477,7 +477,7 @@ defmodule Protocol do
477477 ## Examples
478478
479479 # 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" )
481481 iex> mods = Protocol.extract_impls(Enumerable, [path])
482482 iex> List in mods
483483 true
Original file line number Diff line number Diff line change @@ -161,13 +161,15 @@ defmodule Protocol.ConsolidationTest do
161161 end
162162
163163 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" ) ] )
165165 assert Enumerable in protos
166166 assert Inspect in protos
167167 end
168168
169169 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+
171173 assert List in protos
172174 assert Function in protos
173175 end
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ defmodule IEx.HelpersTest do
144144 describe "open" do
145145 @ iex_helpers "iex/lib/iex/helpers.ex"
146146 @ 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")
148148 @ httpc_erl "src/http_client/httpc.erl"
149149 @ editor System . get_env ( "ELIXIR_EDITOR" )
150150
You can’t perform that action at this time.
0 commit comments