diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-05 23:07:01 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-05 23:07:01 -0200 |
commit | 6cc3afb00a0d7689f5435a3845fd17266d935c3e (patch) | |
tree | 732a6821d5eb50a7d68c37514c109edce87eef89 /activesupport/lib | |
parent | 84fe7b7db64352c0186a9d2a51f4eb32d2825d2a (diff) | |
parent | 26698fb91d88dca0f860adcb80528d8d3f0f6285 (diff) | |
download | rails-6cc3afb00a0d7689f5435a3845fd17266d935c3e.tar.gz rails-6cc3afb00a0d7689f5435a3845fd17266d935c3e.tar.bz2 rails-6cc3afb00a0d7689f5435a3845fd17266d935c3e.zip |
Merge pull request #13953 from seanwalbran/fix-humanize-match-reference
fix interplay of humanize and html_escape
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/inflector/methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index cdee4c2ca5..b642d87d76 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -117,7 +117,7 @@ module ActiveSupport result.gsub!(/([a-z\d]*)/i) { |match| "#{inflections.acronyms[match] || match.downcase}" } - result.gsub!(/^\w/) { $&.upcase } if options.fetch(:capitalize, true) + result.gsub!(/^\w/) { |match| match.upcase } if options.fetch(:capitalize, true) result end |