GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Tweak array construction in `normalize_keys` · ruby-i18n/i18n@f3c1936

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • i18n.rb
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/i18n.rb‎

Copy file name to clipboardExpand all lines: lib/i18n.rb
+5-5Lines changed: 5 additions & 5 deletions
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 (0)
You are visitor 01402605 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.