DEV: `i18n:check` rake task was broken on Ruby 3.1 (#20103)

`server.en.yml` contains aliases and Ruby 3.1 made changes to `YAML.load_file`.
see https://www.ctrl.blog/entry/ruby-psych4.html
This commit is contained in:
Gerhard Schlager 2023-01-31 16:53:24 +01:00 committed by GitHub
parent a5c2146dc0
commit f4ce402dc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -19,8 +19,8 @@ class LocaleFileChecker
@relative_locale_path =
Pathname.new(locale_path).relative_path_from(Pathname.new(Rails.root)).to_s
@locale_yaml = YAML.load_file(locale_path)
@reference_yaml = YAML.load_file(reference_path)
@locale_yaml = YAML.load_file(locale_path, aliases: true)
@reference_yaml = YAML.load_file(reference_path, aliases: true)
next if @locale_yaml.blank? || @locale_yaml.first[1].blank?