From b66033db0fce4fe169eb7efb7492fafe53cff495 Mon Sep 17 00:00:00 2001 From: Andrea Leopardi Date: Sat, 6 Jun 2026 12:30:41 +0200 Subject: [PATCH 1/3] Add more docs to System.otp_release/0 --- lib/elixir/lib/system.ex | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/elixir/lib/system.ex b/lib/elixir/lib/system.ex index d98fecd3f56..8ce7f247332 100644 --- a/lib/elixir/lib/system.ex +++ b/lib/elixir/lib/system.ex @@ -1378,6 +1378,18 @@ defmodule System do @doc """ Returns the Erlang/OTP release number. + + The version is a single number, the major version of OTP. There is + no way to get the *exact* OTP version. This is because the exact + OTP version in the general case is difficult to determine. + For more information, see the [*Versions* page](https://www.erlang.org/doc/system/versions.html) + in the Erlang documentation. + + ## Examples + + System.otp_release() + #=> "29" + """ @spec otp_release :: String.t() @doc since: "1.3.0" From 3935068a0ffabf0876903fec1ae3980bd2dcbb9c Mon Sep 17 00:00:00 2001 From: Andrea Leopardi Date: Sat, 6 Jun 2026 13:24:46 +0200 Subject: [PATCH 2/3] Update lib/elixir/lib/system.ex MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: José Valim --- lib/elixir/lib/system.ex | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/elixir/lib/system.ex b/lib/elixir/lib/system.ex index 8ce7f247332..fde32d815e4 100644 --- a/lib/elixir/lib/system.ex +++ b/lib/elixir/lib/system.ex @@ -1379,11 +1379,10 @@ defmodule System do @doc """ Returns the Erlang/OTP release number. - The version is a single number, the major version of OTP. There is - no way to get the *exact* OTP version. This is because the exact - OTP version in the general case is difficult to determine. - For more information, see the [*Versions* page](https://www.erlang.org/doc/system/versions.html) - in the Erlang documentation. + The version is a single number, the major version of OTP. + Erlang/OTP does not provide an API to fetch the exact + patch version, see the [*Versions* page](https://www.erlang.org/doc/system/versions.html) + in the Erlang documentation for more information. ## Examples From d9418ba0eed511afb7dbd7cc77d74b44332a9115 Mon Sep 17 00:00:00 2001 From: Andrea Leopardi Date: Sat, 6 Jun 2026 13:24:55 +0200 Subject: [PATCH 3/3] Update lib/elixir/lib/system.ex MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: José Valim --- lib/elixir/lib/system.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/elixir/lib/system.ex b/lib/elixir/lib/system.ex index fde32d815e4..6a26794a243 100644 --- a/lib/elixir/lib/system.ex +++ b/lib/elixir/lib/system.ex @@ -1386,8 +1386,8 @@ defmodule System do ## Examples - System.otp_release() - #=> "29" + iex> System.otp_release() + "#{:erlang.system_info(:otp_release)}" """ @spec otp_release :: String.t()