From aa279f33c0a6f8f19301377fc2eeeb2156f07c36 Mon Sep 17 00:00:00 2001 From: Alexander Bulancov <6594487+trinistr@users.noreply.github.com> Date: Thu, 12 Feb 2026 23:35:52 +0300 Subject: [PATCH] Add variants with positional argument to `Hash#transform_keys` and `#transform_keys!` `#transform_keys` accepts an optional positional argument for mapping keys, which can be combined with a block. --- core/hash.rbs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/hash.rbs b/core/hash.rbs index 4061f7745..36a7268bb 100644 --- a/core/hash.rbs +++ b/core/hash.rbs @@ -1870,7 +1870,9 @@ class Hash[unchecked out K, unchecked out V] < Object # Values](rdoc-ref:Hash@Methods+for+Transforming+Keys+and+Values). # def transform_keys: () -> Enumerator[K, Hash[untyped, V]] + | [A] (Hash[K, A]) -> Hash[A, V] | [A] () { (K) -> A } -> Hash[A, V] + | [A] (Hash[K, A]) { (K) -> A } -> Hash[A, V] #