Skip to content

Commit 86a1d80

Browse files
committed
Add support for ports to Elixir.Kernel.inspect
Adds support for inspecting ports in Elixir, allows for `IO.puts("#{inspect(port)}")`, etc... Signed-off-by: Winford <winford@object.stream>
1 parent 44191fc commit 86a1d80

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libs/exavmlib/lib/Kernel.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ defmodule Kernel do
6060
:erlang.pid_to_list(t)
6161
|> :erlang.list_to_binary()
6262

63+
t when is_port(t) ->
64+
:erlang.port_to_list(t)
65+
|> :erlang.list_to_binary()
66+
6367
t when is_function(t) ->
6468
:erlang.fun_to_list(t)
6569
|> :erlang.list_to_binary()

0 commit comments

Comments
 (0)