Skip to content
Browse files

Merge pull request #6699 from takkanm/fix-character-class-duplicated-…

…range-warning

fix warning in Ruby2.0.0
  • Loading branch information...
2 parents b5d82e2 + fa1ea34 commit 2eb4ebe308a027b1a0a64e9b0bf24d8e225590a4 @rafaelfranca rafaelfranca committed Jun 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/multibyte/chars.rb
View
2 activesupport/lib/active_support/multibyte/chars.rb
@@ -133,7 +133,7 @@ def capitalize
# "É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

0 comments on commit 2eb4ebe

Please sign in to comment.
Something went wrong with that request. Please try again.