Browse files

Preload UnicodeDatabase outside the loop

This fixes random multibyte_chars_test fail under Ruby 1.9.3.
I don't know why the tests fail. And I really don't know why this fixes.
Maybe we need some more investigation...
  • Loading branch information...
1 parent 80ceb0b commit 393e19e508a08ede0f5037bccb984e3eb252d579 @amatsuda amatsuda committed Aug 17, 2014
Showing with 1 addition and 0 deletions.
  1. +1 −0 activesupport/lib/active_support/multibyte/unicode.rb
@@ -368,6 +368,7 @@ def self.filename
def apply_mapping(string, mapping) #:nodoc:
+ database.codepoints do |codepoint|
cp = database.codepoints[codepoint]
if cp and (ncp = cp.send(mapping)) and ncp > 0

0 comments on commit 393e19e

Please sign in to comment.