diff options
author | Michael Koziarski <michael@koziarski.com> | 2009-02-06 13:32:47 +1300 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2009-02-06 13:32:47 +1300 |
commit | 4e4f961c112f1ffac73a1397d94dfbb4a10effae (patch) | |
tree | 8b16e8180e88a9fb51e4e4eeb93df2dc03e67ed2 /activesupport/lib/active_support | |
parent | d15d53cf810014b90827015ecd0e601176492fb7 (diff) | |
download | rails-4e4f961c112f1ffac73a1397d94dfbb4a10effae.tar.gz rails-4e4f961c112f1ffac73a1397d94dfbb4a10effae.tar.bz2 rails-4e4f961c112f1ffac73a1397d94dfbb4a10effae.zip |
Handle every error that can come out of the Iconv branch by rescuing and returning nil
[#1195 state:committed]
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/inflector.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb index 4921b99677..5ff6f50fb3 100644 --- a/activesupport/lib/active_support/inflector.rb +++ b/activesupport/lib/active_support/inflector.rb @@ -284,7 +284,7 @@ module ActiveSupport # 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 |