diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 4 |
2 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,10 @@ +Wed Oct 8 04:33:04 2014 Rei Odaira <Rei.Odaira@gmail.com> + + * 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@marc-andre.ca> * lib/matrix.rb: Add Matrix#laplace_expansion. diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 22bbcf02ed..2dc7a0b315 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -209,10 +209,12 @@ class TestRubyOptions < Test::Unit::TestCase 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/ |