Commit b50ddcbb54d14106fd8e7558323b10841d3c274e

Thomas de Grivel 2022-02-03T15:26:08

fix stack trace

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/lib/stack.ex b/lib/stack.ex
index c46b205..9c5c9ca 100644
--- a/lib/stack.ex
+++ b/lib/stack.ex
@@ -7,12 +7,8 @@ defmodule Stack do
     str = "#{module}.#{fun}/#{arity}\n    #{file}:#{line}"
     to_string(rest, [str | acc])
   end
-  def to_string([{module, fun, arity, _} | rest], acc) when is_list(module) do
-    str = "#{module |> Enum.join(".")}.#{fun}/#{arity}"
-    to_string(rest, [str | acc])
-  end
   def to_string([{module, fun, arity, _} | rest], acc) do
-    str = "#{module}.#{fun}/#{arity}"
+    str = "#{inspect(module)}.#{inspect(fun)}/#{inspect(arity)}"
     to_string(rest, [str | acc])
   end
   def to_string([elt | rest], acc) do