Skip to content
This repository
Browse code

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

…range-warning

fix warning in Ruby2.0.0
  • Loading branch information...
commit 2eb4ebe308a027b1a0a64e9b0bf24d8e225590a4 2 parents b5d82e2 + fa1ea34
Rafael Mendonça França authored June 11, 2012
2  activesupport/lib/active_support/multibyte/chars.rb
@@ -133,7 +133,7 @@ def capitalize
133 133
       #   "ÉL QUE SE ENTERÓ".mb_chars.titleize    # => "Él Que Se Enteró"
134 134
       #   "日本語".mb_chars.titleize                 # => "日本語"
135 135
       def titleize
136  
-        chars(downcase.to_s.gsub(/\b('?[\S])/u) { Unicode.upcase($1)})
  136
+        chars(downcase.to_s.gsub(/\b('?\S)/u) { Unicode.upcase($1)})
137 137
       end
138 138
       alias_method :titlecase, :titleize
139 139
 

0 notes on commit 2eb4ebe

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