aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-08-05 00:51:16 +0000
committerMichael Koziarski <michael@koziarski.com>2007-08-05 00:51:16 +0000
commit73f72eeec2d0cc689735f52de4a5c3c80c4c1e85 (patch)
tree1a996f0bd7b8b022116beb722096fef40dd7b237 /activesupport/test
parentfe3e03e7708c576d5b09fb161e68d715796eae67 (diff)
downloadrails-73f72eeec2d0cc689735f52de4a5c3c80c4c1e85.tar.gz
rails-73f72eeec2d0cc689735f52de4a5c3c80c4c1e85.tar.bz2
rails-73f72eeec2d0cc689735f52de4a5c3c80c4c1e85.zip
Make the utf-handler return the correct value for non-matching regular expressions. Closes #9049 [manfred]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7273 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/multibyte_chars_test.rb4
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