diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-17 02:00:05 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-17 02:00:05 +0000 |
commit | 0f4199fb56ec12dae32a6fa099f15aaa7e55d10f (patch) | |
tree | 04c8df1b84a56c8b55f3f929b0d9744acfe7196c /test | |
parent | 35cb0f807b4689b0405dfbb2821e13f14c1fca45 (diff) | |
download | ruby-0f4199fb56ec12dae32a6fa099f15aaa7e55d10f.tar.gz |
* re.c (rb_reg_quote): return US-ASCII string consistently.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_m17n.rb | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index fe85941ba6..37accee3f8 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -523,16 +523,14 @@ class TestM17N < Test::Unit::TestCase def test_quote assert_regexp_generic_ascii(/#{Regexp.quote(a("a"))}#{Regexp.quote(e("e"))}/) - # Regexp.quote returns ASCII-8BIT string for ASCII only string - # to make generic regexp if possible. - assert_encoding("ASCII-8BIT", Regexp.quote(a("")).encoding) - assert_encoding("ASCII-8BIT", Regexp.quote(e("")).encoding) - assert_encoding("ASCII-8BIT", Regexp.quote(s("")).encoding) - assert_encoding("ASCII-8BIT", Regexp.quote(u("")).encoding) - assert_encoding("ASCII-8BIT", Regexp.quote(a("a")).encoding) - assert_encoding("ASCII-8BIT", Regexp.quote(e("a")).encoding) - assert_encoding("ASCII-8BIT", Regexp.quote(s("a")).encoding) - assert_encoding("ASCII-8BIT", Regexp.quote(u("a")).encoding) + assert_encoding("US-ASCII", Regexp.quote(a("")).encoding) + assert_encoding("US-ASCII", Regexp.quote(e("")).encoding) + assert_encoding("US-ASCII", Regexp.quote(s("")).encoding) + assert_encoding("US-ASCII", Regexp.quote(u("")).encoding) + assert_encoding("US-ASCII", Regexp.quote(a("a")).encoding) + assert_encoding("US-ASCII", Regexp.quote(e("a")).encoding) + assert_encoding("US-ASCII", Regexp.quote(s("a")).encoding) + assert_encoding("US-ASCII", Regexp.quote(u("a")).encoding) assert_encoding("ASCII-8BIT", Regexp.quote(a("\xc2\xa1")).encoding) assert_encoding("EUC-JP", Regexp.quote(e("\xc2\xa1")).encoding) |