aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortakkanm <takkanm@gmail.com>2012-06-11 13:25:46 +0900
committertakkanm <takkanm@gmail.com>2012-06-11 13:25:46 +0900
commitfa1ea34c5c41db2cc092170d03098747a6d70b5c (patch)
treed4fa9597f4ee66f47b383bf1160fe42f79975421
parentf48e7676e9b70884c309d3170b7ae8867e4bd252 (diff)
downloadrails-fa1ea34c5c41db2cc092170d03098747a6d70b5c.tar.gz
rails-fa1ea34c5c41db2cc092170d03098747a6d70b5c.tar.bz2
rails-fa1ea34c5c41db2cc092170d03098747a6d70b5c.zip
fix warning in Ruby2.0.0
``` rails/activesupport/lib/active_support/multibyte/chars.rb:136: warning: character class has duplicated range: /\b('?[\S])/ ```
-rw-r--r--activesupport/lib/active_support/multibyte/chars.rb2
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