Skip to content

Commit

Permalink
Avoid warnings by undefining the old method transliterate.
Browse files Browse the repository at this point in the history
  • Loading branch information
NZKoz committed Oct 14, 2008
1 parent e0993c6 commit 3e9fc27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions activesupport/lib/active_support/inflector.rb
Expand Up @@ -279,6 +279,7 @@ def transliterate(string)
# The iconv transliteration code doesn't function correctly
# on some platforms, but it's very fast where it does function.
if "foo" != Inflector.transliterate("föö")
undef_method :transliterate
def transliterate(string)
string.mb_chars.normalize(:kd). # Decompose accented characters
gsub(/[^\x00-\x7F]+/, '') # Remove anything non-ASCII entirely (e.g. diacritics).
Expand Down

0 comments on commit 3e9fc27

Please sign in to comment.