Skip to content

Commit c5d770e

Browse files
committed
Fix more deprecation warnings
1 parent b4e2f6c commit c5d770e

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

lib/display/failure.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ defmodule Display.Failure do
5050
end
5151

5252
defp format_error(error) do
53-
trace = System.stacktrace() |> Enum.take(2)
53+
trace = Process.info(self(), :current_stacktrace) |> Enum.take(2)
5454
Paint.red(Exception.format(:error, error, trace))
5555
end
5656

lib/elixir_koans.ex

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ defmodule ElixirKoans do
33
use Application
44

55
def start(_type, _args) do
6-
import Supervisor.Spec
7-
86
children = [
9-
worker(Display, []),
10-
worker(Tracker, []),
11-
worker(Runner, []),
12-
worker(Watcher, [])
7+
%{id: Display, start: {Display, :start_link, []}},
8+
%{id: Tracker, start: {Tracker, :start_link, []}},
9+
%{id: Runner, start: {Runner, :start_link, []}},
10+
%{id: Watcher, start: {Watcher, :start_link, []}}
1311
]
1412

1513
opts = [strategy: :one_for_one, name: ElixirKoans.Supervisor]

test/executor_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defmodule ExecuteTest do
77

88
test "stops at the first failing koan" do
99
{:failed, %{file: file, line: line}, SampleKoan, _name} = Execute.run_module(SampleKoan)
10-
assert file == 'test/support/sample_koan.ex'
10+
assert file == ~c'test/support/sample_koan.ex'
1111
assert line == 9
1212
end
1313

0 commit comments

Comments
 (0)