ruby-changes:3911
From: ko1@a...
Date: Fri, 8 Feb 2008 13:27:57 +0900 (JST)
Subject: [ruby-changes:3911] akr - Ruby:r15401 (trunk): add a test.
akr 2008-02-08 13:27:37 +0900 (Fri, 08 Feb 2008) New Revision: 15401 Modified files: trunk/test/ruby/test_m17n.rb Log: add a test. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_m17n.rb?r1=15401&r2=15400&diff_format=u Index: test/ruby/test_m17n.rb =================================================================== --- test/ruby/test_m17n.rb (revision 15400) +++ test/ruby/test_m17n.rb (revision 15401) @@ -864,6 +864,14 @@ assert_equal(["a"], e("\xa1\xa2a\xa3\xa4").scan(/a/)) end + def test_scan_dup + s1 = e("\xa4\xa2")*100 + s2 = s1.dup.force_encoding("ascii-8bit") + s2.scan(/\A./n) {|f| + assert_equal(Encoding::ASCII_8BIT, f.encoding) + } + end + def test_upto s1 = e("\xa1\xa2") s2 = s("\xa1\xa2") -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/