Skip to content

Commit b8b193a

Browse files
committed
Merge pull request #1472 from UncleGrumpy/elixir_inspect_port
Add support for ports to Elixir.Kernel.inspect Adds support for inspecting ports in Elixir, allows for `IO.puts("#{inspect(port)}")`, etc... These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents f435dc1 + 86a1d80 commit b8b193a

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)