summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_m17n.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-17 02:00:05 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-17 02:00:05 +0000
commitc3da6e5eb3ba28d818b64b9049d9f0fe10800fe3 (patch)
tree04c8df1b84a56c8b55f3f929b0d9744acfe7196c /test/ruby/test_m17n.rb
parent8bb405d2adb3bb5351cfaaf1bc10bb3ec5acffb6 (diff)
downloadruby-c3da6e5eb3ba28d818b64b9049d9f0fe10800fe3.tar.gz
ruby-c3da6e5eb3ba28d818b64b9049d9f0fe10800fe3.tar.xz
ruby-c3da6e5eb3ba28d818b64b9049d9f0fe10800fe3.zip
* re.c (rb_reg_quote): return US-ASCII string consistently.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r--test/ruby/test_m17n.rb18
1 files changed, 8 insertions, 10 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index fe85941ba..37accee3f 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)