From 2dd0012858338ef40b8decf0d9b751676e598262 Mon Sep 17 00:00:00 2001 From: Venkatesh-Prasad Ranganath Date: Sat, 28 Dec 2024 14:55:46 -0600 Subject: [PATCH] Fix a typo in the error message --- spec/std/enumerable_spec.cr | 8 ++++---- src/enumerable.cr | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/std/enumerable_spec.cr b/spec/std/enumerable_spec.cr index 5c66ddf55062..09d89ddcdf6d 100644 --- a/spec/std/enumerable_spec.cr +++ b/spec/std/enumerable_spec.cr @@ -1374,8 +1374,8 @@ describe "Enumerable" do [1, 10000000000_u64].sum CRYSTAL "Enumerable#sum() and #product() do not support Union types. " + - "Instead, use Enumerable#sum and #product(initial), respectively, " + - "with an initial value of the intended type of the call." + "Instead, use Enumerable#sum(initial) and #product(initial), " + + "respectively, with an initial value of the intended type of the call." end it "uses additive_identity from type" do @@ -1428,8 +1428,8 @@ describe "Enumerable" do [1, 10000000000_u64].product CRYSTAL "Enumerable#sum() and #product() do not support Union types. " + - "Instead, use Enumerable#sum and #product(initial), respectively, " + - "with an initial value of the intended type of the call." + "Instead, use Enumerable#sum(initial) and #product(initial), " + + "respectively, with an initial value of the intended type of the call." end end diff --git a/src/enumerable.cr b/src/enumerable.cr index fb78d5c569ce..0e87867b28dd 100644 --- a/src/enumerable.cr +++ b/src/enumerable.cr @@ -2300,7 +2300,7 @@ module Enumerable(T) {% if X.union? %} {{ raise("Enumerable#sum() and #product() do not support Union types. " + - "Instead, use Enumerable#sum and #product(initial), " + + "Instead, use Enumerable#sum(initial) and #product(initial), " + "respectively, with an initial value of the intended type " + "of the call.") }}