Permalink
Browse files

fix warning in Ruby2.0.0

```
rails/activesupport/lib/active_support/multibyte/chars.rb:136: warning:
character class has duplicated range: /\b('?[\S])/
```
  • Loading branch information...
1 parent f48e767 commit fa1ea34c5c41db2cc092170d03098747a6d70b5c @takkanm takkanm committed Jun 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 fa1ea34

Please sign in to comment.