From 8dc4e2316c9b8f62b1e02e2c8a8d178fa01b15de Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Wed, 21 Jul 2021 09:24:27 +0900 Subject: [PATCH] Fix referencing a capture in a string [ci skip] ```irb irb(main):001:0> '\1en' => "\\1en" irb(main):002:0> "\1en" => "\u0001en" irb(main):003:0> "\\1en" => "\\1en" ``` --- .../rails/app/templates/config/initializers/inflections.rb.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb.tt index ceb4902f3ca..3860f659ead 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb.tt @@ -4,8 +4,8 @@ # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, "\1en" -# inflect.singular /^(ox)en/i, "\1" +# inflect.plural /^(ox)$/i, "\\1en" +# inflect.singular /^(ox)en/i, "\\1" # inflect.irregular "person", "people" # inflect.uncountable %w( fish sheep ) # end