Skip to content

Commit 00fc810

Browse files
authored
Merge pull request #616 from codealchemy/normalize-keys/splat
Minor `I18n.normalize_keys` improvement
2 parents a1dc424 + f3c1936 commit 00fc810

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: lib/i18n.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,11 @@ def with_locale(tmp_locale = nil)
338338
def normalize_keys(locale, key, scope, separator = nil)
339339
separator ||= I18n.default_separator
340340

341-
keys = []
342-
keys.concat normalize_key(locale, separator)
343-
keys.concat normalize_key(scope, separator)
344-
keys.concat normalize_key(key, separator)
345-
keys
341+
[
342+
*normalize_key(locale, separator),
343+
*normalize_key(scope, separator),
344+
*normalize_key(key, separator)
345+
]
346346
end
347347

348348
# Returns true when the passed locale, which can be either a String or a

0 commit comments

Comments
 (0)