Skip to content

Commit fa1ea34

Browse files
committed
fix warning in Ruby2.0.0
``` rails/activesupport/lib/active_support/multibyte/chars.rb:136: warning: character class has duplicated range: /\b('?[\S])/ ```
1 parent f48e767 commit fa1ea34

File tree

1 file changed

+1
-1
lines changed
  • activesupport/lib/active_support/multibyte

1 file changed

+1
-1
lines changed

activesupport/lib/active_support/multibyte/chars.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def capitalize
133133
# "ÉL QUE SE ENTERÓ".mb_chars.titleize # => "Él Que Se Enteró"
134134
# "日本語".mb_chars.titleize # => "日本語"
135135
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)})
137137
end
138138
alias_method :titlecase, :titleize
139139

0 commit comments

Comments
 (0)