From 1a492ba17d2c73de395d46a5f988110b2698d434 Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 15 Feb 2011 07:14:00 +0000 Subject: 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 --- test/ruby/test_m17n.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index f6c4a19088..a29d509fc4 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -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 -- cgit v1.2.3