diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-05 18:36:56 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-05 18:36:56 +0000 |
commit | 1347a9a7e03fded7881a4c4fa40fe843edfaf5f1 (patch) | |
tree | 76ce67de2fd7efcc739fe474e86aef506276fbab /test/ruby | |
parent | da42c102c18156c2192df203cb2f79b88aa8092f (diff) | |
download | ruby-1347a9a7e03fded7881a4c4fa40fe843edfaf5f1.tar.gz |
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_m17n.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index daa8af7fc4..b86b14658d 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -1883,6 +1883,10 @@ class TestM17N < Test::Unit::TestCase s.ascii_only? s.gsub!(/b/, "\x80") assert_equal(false, s.ascii_only?, "[ruby-core:14566] reported by Sam Ruby") + + s = "abc".force_encoding(Encoding::ASCII_8BIT) + t = s.gsub(/b/, "\xa1\xa1".force_encoding("euc-jp")) + assert_equal(Encoding::ASCII_8BIT, s.encoding) end def test_regexp_match |