[前][次][番号順一覧][スレッド一覧]

ruby-changes:18856

From: naruse <ko1@a...>
Date: Tue, 15 Feb 2011 16:15:37 +0900 (JST)
Subject: [ruby-changes:18856] Ruby:r30881 (trunk): Add a test for the encoding of str_aset.

naruse	2011-02-15 16:14:00 +0900 (Tue, 15 Feb 2011)

  New Revision: 30881

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30881

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

  Modified files:
    trunk/test/ruby/test_m17n.rb

Index: test/ruby/test_m17n.rb
===================================================================
--- test/ruby/test_m17n.rb	(revision 30880)
+++ test/ruby/test_m17n.rb	(revision 30881)
@@ -933,6 +933,10 @@
   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]