Re: [elixir-core:11523] [Proposal] System.put_env/2 clears env on getting nil as value

2023-09-18 Thread José Valim
Sounds good to me. PR welcome! On Mon, Sep 18, 2023 at 6:41 PM Michal Śledź wrote: > System.put_env/1 erases given key when a value is nil. > > The proposal is to make System.put_env/2 symmetric with the > System.put_env/1 and also erase a key on the nil value. > > The spec would change from: >

[elixir-core:11523] [Proposal] System.put_env/2 clears env on getting nil as value

2023-09-18 Thread Michal Śledź
System.put_env/1 erases given key when a value is nil. The proposal is to make System.put_env/2 symmetric with the System.put_env/1 and also erase a key on the nil value. The spec would change from: @spec put_env(binary(), binary()) :: :ok to: @spec put_env(binary(), binary() | nil) :: :ok