From ef0ed32213e82d452a52dd3f3c86db67b331a9dc Mon Sep 17 00:00:00 2001 From: przem Date: Tue, 17 Sep 2024 18:29:49 +0200 Subject: [PATCH 1/2] Map.pop!/2 description modification --- lib/elixir/lib/map.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/elixir/lib/map.ex b/lib/elixir/lib/map.ex index e6af533ac51..e0b9ca5ad3f 100644 --- a/lib/elixir/lib/map.ex +++ b/lib/elixir/lib/map.ex @@ -710,9 +710,9 @@ defmodule Map do @doc """ Removes the value associated with `key` in `map` and returns the value - and the updated map, or it raises if `key` is not present. + and the updated map, or it raises a `KeyError` exception if `key` is not present. - Behaves the same as `pop/3` but raises if `key` is not present in `map`. + Behaves the same as `pop/3` but raises a `KeyError` exception if `key` is not present in `map`. ## Examples From ee518ccdfa9ab683658b399341d9e9a92e8e0d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 17 Sep 2024 19:11:30 +0200 Subject: [PATCH 2/2] Update map.ex --- lib/elixir/lib/map.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/elixir/lib/map.ex b/lib/elixir/lib/map.ex index e0b9ca5ad3f..b759623f87e 100644 --- a/lib/elixir/lib/map.ex +++ b/lib/elixir/lib/map.ex @@ -709,8 +709,8 @@ defmodule Map do end @doc """ - Removes the value associated with `key` in `map` and returns the value - and the updated map, or it raises a `KeyError` exception if `key` is not present. + Removes and returns the value associated with `key` in `map` alongside + the updated map, or raises if `key` is not present. Behaves the same as `pop/3` but raises a `KeyError` exception if `key` is not present in `map`.