Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Handle every error that can come out of the Iconv branch by rescuing …

…and returning nil

[#1195 state:committed]
  • Loading branch information...
commit 4e4f961c112f1ffac73a1397d94dfbb4a10effae 1 parent d15d53c
@NZKoz NZKoz authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activesupport/lib/active_support/inflector.rb
View
2  activesupport/lib/active_support/inflector.rb
@@ -284,7 +284,7 @@ def transliterate(string)
# The iconv transliteration code doesn't function correctly
# on some platforms, but it's very fast where it does function.
- elsif "foo" != Inflector.transliterate("föö")
+ elsif "foo" != (Inflector.transliterate("föö") rescue nil)
undef_method :transliterate
def transliterate(string)
string.mb_chars.normalize(:kd). # Decompose accented characters
Please sign in to comment.
Something went wrong with that request. Please try again.