Add a test for the encoding of str_aset. [ruby-core:35142]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2011-02-15 07:14:00 +00:00
parent c7d3b3f1b4
commit 1a492ba17d

View File

@ -933,6 +933,10 @@ class TestM17N < Test::Unit::TestCase
def test_aset
s = e("\xa3\xb0\xa3\xb1\xa3\xb2\xa3\xb3\xa3\xb4")
assert_raise(Encoding::CompatibilityError){s["\xb0\xa3"] = "foo"}
a = ua("a")
a[/a/] = u("")
assert_equal Encoding::US_ASCII, a.encoding
end
def test_str_center