From b998a9f169023cfe34a9efc1d00138d62dbc4e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Mon, 28 Jun 2021 18:54:15 +0200 Subject: [PATCH] Revert "Fix return type restriciton of Enumerable#minmax" This reverts commit 0cad8f7c7ac50778f0095151be9e785a6ee06546. --- src/enumerable.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/enumerable.cr b/src/enumerable.cr index 61e941575685..b9c3f587cfea 100644 --- a/src/enumerable.cr +++ b/src/enumerable.cr @@ -1099,7 +1099,7 @@ module Enumerable(T) end # Like `minmax` but returns `{nil, nil}` if the collection is empty. - def minmax? : {T, T} | {Nil, Nil} + def minmax? : {T?, T?} minmax_by? &.itself end