ruby-changes:35754
From: odaira <ko1@a...>
Date: Wed, 8 Oct 2014 04:33:54 +0900 (JST)
Subject: [ruby-changes:35754] odaira:r47836 (trunk): test/ruby/test_rubyoptions.rb (TestRubyOptions#test_encoding): On AIX, locale_charmap is ISO-8859-1 with LANG=C. This means the source encoding of stdin is ISO-8859-1, so "invalid multibyte char" error does not occur
odaira 2014-10-08 04:33:48 +0900 (Wed, 08 Oct 2014) New Revision: 47836 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47836 Log: test/ruby/test_rubyoptions.rb (TestRubyOptions#test_encoding): On AIX, locale_charmap is ISO-8859-1 with LANG=C. This means the source encoding of stdin is ISO-8859-1, so "invalid multibyte char" error does not occur Modified files: trunk/ChangeLog trunk/test/ruby/test_rubyoptions.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 47835) +++ ChangeLog (revision 47836) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Oct 8 04:33:04 2014 Rei Odaira <Rei.Odaira@g...> + + * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_encoding): + On AIX, locale_charmap is ISO-8859-1 with LANG=C. This means + the source encoding of stdin is ISO-8859-1, so "invalid + multibyte char" error does not occur. + Wed Oct 8 04:30:29 2014 Marc-Andre Lafortune <ruby-core@m...> * lib/matrix.rb: Add Matrix#laplace_expansion. Index: test/ruby/test_rubyoptions.rb =================================================================== --- test/ruby/test_rubyoptions.rb (revision 47835) +++ test/ruby/test_rubyoptions.rb (revision 47836) @@ -209,10 +209,12 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L209 assert_in_out_err(%w(--encoding test_ruby_test_rubyoptions_foobarbazqux), "", [], /unknown encoding name - test_ruby_test_rubyoptions_foobarbazqux \(RuntimeError\)/) - if /mswin|mingw/ =~ RUBY_PLATFORM && + if /mswin|mingw|aix/ =~ RUBY_PLATFORM && (str = "\u3042".force_encoding(Encoding.find("locale"))).valid_encoding? # This result depends on locale because LANG=C doesn't affect locale # on Windows. + # On AIX, the source encoding of stdin with LANG=C is ISO-8859-1, + # which allows \u3042. out, err = [str], [] else out, err = [], /invalid multibyte char/ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/