From d307f01bfad1f60f3275938b8326bd00f6b552a3 Mon Sep 17 00:00:00 2001 From: Vitalii Elenhaupt Date: Fri, 13 Apr 2018 20:10:21 +0300 Subject: [PATCH] Add a space delimiter to duplicated hash keys --- spec/ameba/rule/hash_duplicated_key_spec.cr | 2 +- src/ameba/rule/hash_duplicated_key.cr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/ameba/rule/hash_duplicated_key_spec.cr b/spec/ameba/rule/hash_duplicated_key_spec.cr index 65a50c2b..4f03e1bd 100644 --- a/spec/ameba/rule/hash_duplicated_key_spec.cr +++ b/spec/ameba/rule/hash_duplicated_key_spec.cr @@ -44,7 +44,7 @@ module Ameba::Rule ) subject.catch(s).should_not be_valid error = s.errors.first - error.message.should eq %(Duplicated keys in hash literal: "key1","key2") + error.message.should eq %(Duplicated keys in hash literal: "key1", "key2") end end end diff --git a/src/ameba/rule/hash_duplicated_key.cr b/src/ameba/rule/hash_duplicated_key.cr index f8d9fcfa..37a719de 100644 --- a/src/ameba/rule/hash_duplicated_key.cr +++ b/src/ameba/rule/hash_duplicated_key.cr @@ -33,7 +33,7 @@ module Ameba::Rule return unless (keys = duplicated_keys(node.entries)).any? source.error self, node.location, - "Duplicated keys in hash literal: #{keys.join(",")}" + "Duplicated keys in hash literal: #{keys.join(", ")}" end private def duplicated_keys(entries)