mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
Replace Hash#keys.each with Hash#each_key for some perf boost
This commit is contained in:
parent
d16df04c76
commit
9fbc763902
12 changed files with 15 additions and 15 deletions
|
@ -16,7 +16,7 @@ class SiteSettings::YamlLoader
|
|||
|
||||
def load
|
||||
yaml = YAML.load_file(@file)
|
||||
yaml.keys.each do |category|
|
||||
yaml.each_key do |category|
|
||||
yaml[category].each do |setting_name, hash|
|
||||
if hash.is_a?(Hash)
|
||||
# Get default value for the site setting:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue