diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/multibyte_chars_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/test/multibyte_chars_test.rb b/activesupport/test/multibyte_chars_test.rb index d8766af3b8..6e87ea8851 100644 --- a/activesupport/test/multibyte_chars_test.rb +++ b/activesupport/test/multibyte_chars_test.rb @@ -81,6 +81,8 @@ class CharsTest < Test::Unit::TestCase with_kcode('UTF8') do assert_equal 9, (@s[:utf8].chars =~ /ffi/), "Regex matching should be unicode aware" + assert_nil((''.chars =~ /\d+/), + "Non-matching regular expressions should return nil") end end @@ -118,7 +120,7 @@ class CharsTest < Test::Unit::TestCase def test_passthrough_on_kcode # The easiest way to check if the passthrough is in place is through #size - with_kcode('nonce') do + with_kcode('none') do assert_equal 26, @s[:utf8].chars.size end with_kcode('UTF8') do |