diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-06-11 11:56:20 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-06-11 11:56:20 -0300 |
commit | 2eb4ebe308a027b1a0a64e9b0bf24d8e225590a4 (patch) | |
tree | 91fbf574538cbc2235d6c4b5e2b599d735361629 /activesupport | |
parent | b5d82e20a8be3bf6b588f780640505d7ec12d126 (diff) | |
parent | fa1ea34c5c41db2cc092170d03098747a6d70b5c (diff) | |
download | rails-2eb4ebe308a027b1a0a64e9b0bf24d8e225590a4.tar.gz rails-2eb4ebe308a027b1a0a64e9b0bf24d8e225590a4.tar.bz2 rails-2eb4ebe308a027b1a0a64e9b0bf24d8e225590a4.zip |
Merge pull request #6699 from takkanm/fix-character-class-duplicated-range-warning
fix warning in Ruby2.0.0
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/multibyte/chars.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index 87b1d76026..47336d2143 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -133,7 +133,7 @@ module ActiveSupport #:nodoc: # "ÉL QUE SE ENTERÓ".mb_chars.titleize # => "Él Que Se Enteró" # "日本語".mb_chars.titleize # => "日本語" def titleize - chars(downcase.to_s.gsub(/\b('?[\S])/u) { Unicode.upcase($1)}) + chars(downcase.to_s.gsub(/\b('?\S)/u) { Unicode.upcase($1)}) end alias_method :titlecase, :titleize |