From 98836d88b03907043e1d260147a918d27f195325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20G=C3=B6m=C3=B6ri?= Date: Mon, 24 Mar 2025 00:06:32 +0100 Subject: [PATCH] Support recon:info(Pid, {dictionary, Key}) introduced in OTP 26.2 Keeping the function clause generic so that dialyzer does not complain on older versions where the second arg of erlang:process_info must be an atom or list. --- src/recon.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/recon.erl b/src/recon.erl index 1a16c74..5826b63 100644 --- a/src/recon.erl +++ b/src/recon.erl @@ -233,8 +233,6 @@ proc_info(Pid, binary_memory) -> {binary, Bins} -> {binary_memory, recon_lib:binary_memory(Bins)} end; -proc_info(Pid, Term) when is_atom(Term) -> - erlang:process_info(Pid, Term); proc_info(Pid, List) when is_list(List) -> case lists:member(binary_memory, List) of false -> @@ -244,7 +242,9 @@ proc_info(Pid, List) when is_list(List) -> undefined -> undefined; Res when is_list(Res) -> proc_fake(List, Res) end - end. + end; +proc_info(Pid, Term) -> + erlang:process_info(Pid, Term). %% @private Replace keys around replace(_, _, []) -> [];