ruby-changes:16414
From: nobu <ko1@a...>
Date: Wed, 23 Jun 2010 12:45:28 +0900 (JST)
Subject: [ruby-changes:16414] Ruby:r28397 (ruby_1_9_2, trunk): * test/ruby/test_regexp.rb (test_dup_warn): read in UTF-8
nobu 2010-06-23 12:44:55 +0900 (Wed, 23 Jun 2010) New Revision: 28397 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28397 Log: * test/ruby/test_regexp.rb (test_dup_warn): read in UTF-8 encoding regardless environment. * test/ruby/envutil.rb (invoke_ruby): add encoding option. Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/test/ruby/envutil.rb branches/ruby_1_9_2/test/ruby/test_regexp.rb branches/ruby_1_9_2/version.h trunk/ChangeLog trunk/test/ruby/envutil.rb trunk/test/ruby/test_regexp.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 28396) +++ ChangeLog (revision 28397) @@ -1,3 +1,10 @@ +Wed Jun 23 12:44:47 2010 Nobuyoshi Nakada <nobu@r...> + + * test/ruby/test_regexp.rb (test_dup_warn): read in UTF-8 + encoding regardless environment. + + * test/ruby/envutil.rb (invoke_ruby): add encoding option. + Wed Jun 23 06:44:05 2010 Nobuyoshi Nakada <nobu@r...> * configure.in (fchown): need to check. a patch by Eric Wong Index: test/ruby/test_regexp.rb =================================================================== --- test/ruby/test_regexp.rb (revision 28396) +++ test/ruby/test_regexp.rb (revision 28397) @@ -819,9 +819,11 @@ end def test_dup_warn - assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3041]/\n!x", [], /\A\z/) - assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3042]/\n!x", [], /duplicated/) - assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3041-\u3043]/\n!x", [], /duplicated/) + assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3041]/\n!x", [], []) + assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3042]/\n!x", [], /duplicated/u, nil, + encoding: Encoding::UTF_8) + assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3041-\u3043]/\n!x", [], /duplicated/u, nil, + encoding: Encoding::UTF_8) end def test_property_warn Index: test/ruby/envutil.rb =================================================================== --- test/ruby/envutil.rb (revision 28396) +++ test/ruby/envutil.rb (revision 28397) @@ -76,6 +76,10 @@ opt[:in] = in_c opt[:out] = out_c if capture_stdout opt[:err] = err_c if capture_stderr + if enc = opt.delete(:encoding) + out_p.set_encoding(enc) if out_p + err_p.set_encoding(enc) if err_p + end case args.first when Hash child_env = [args.shift] Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 28396) +++ ruby_1_9_2/ChangeLog (revision 28397) @@ -1,3 +1,10 @@ +Wed Jun 23 12:44:47 2010 Nobuyoshi Nakada <nobu@r...> + + * test/ruby/test_regexp.rb (test_dup_warn): read in UTF-8 + encoding regardless environment. + + * test/ruby/envutil.rb (invoke_ruby): add encoding option. + Tue Jun 22 23:10:10 2010 Tanaka Akira <akr@f...> * time.c (num_exact): fix for mathn. [ruby-dev:41599] Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 28396) +++ ruby_1_9_2/version.h (revision 28397) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_RELEASE_DATE "2010-06-22" +#define RUBY_RELEASE_DATE "2010-06-23" #define RUBY_PATCHLEVEL -1 #define RUBY_VERSION_MAJOR 1 @@ -7,7 +7,7 @@ #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_YEAR 2010 #define RUBY_RELEASE_MONTH 6 -#define RUBY_RELEASE_DAY 22 +#define RUBY_RELEASE_DAY 23 #include "ruby/version.h" Index: ruby_1_9_2/test/ruby/test_regexp.rb =================================================================== --- ruby_1_9_2/test/ruby/test_regexp.rb (revision 28396) +++ ruby_1_9_2/test/ruby/test_regexp.rb (revision 28397) @@ -819,9 +819,11 @@ end def test_dup_warn - assert_in_out_err('-w', 'x=/[\u3042\u3041]/', [], /\A\z/) - assert_in_out_err('-w', 'x=/[\u3042\u3042]/', [], /duplicated/) - assert_in_out_err('-w', 'x=/[\u3042\u3041-\u3043]/', [], /duplicated/) + assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3041]/\n!x", [], []) + assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3042]/\n!x", [], /duplicated/u, nil, + encoding: Encoding::UTF_8) + assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3041-\u3043]/\n!x", [], /duplicated/u, nil, + encoding: Encoding::UTF_8) end def test_property_warn Index: ruby_1_9_2/test/ruby/envutil.rb =================================================================== --- ruby_1_9_2/test/ruby/envutil.rb (revision 28396) +++ ruby_1_9_2/test/ruby/envutil.rb (revision 28397) @@ -76,6 +76,10 @@ opt[:in] = in_c opt[:out] = out_c if capture_stdout opt[:err] = err_c if capture_stderr + if enc = opt.delete(:encoding) + out_p.set_encoding(enc) if out_p + err_p.set_encoding(enc) if err_p + end case args.first when Hash child_env = [args.shift] -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/