Skip to content

Commit

Permalink
Use :erlang.fun_info/2 instead of :erlang.fun_info/1 (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
ypconstante authored Dec 19, 2023
1 parent 79cfb90 commit 877b86f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mox.ex
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,8 @@ defmodule Mox do
end

defp arity(code) do
:erlang.fun_info(code)[:arity]
{:arity, arity} = :erlang.fun_info(code, :arity)
arity
end

defp add_expectation!(mock, name, arity, value) do
Expand Down

0 comments on commit 877b86f

Please sign in to comment.