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

ruby-changes:33387

From: nobu <ko1@a...>
Date: Sat, 29 Mar 2014 07:43:27 +0900 (JST)
Subject: [ruby-changes:33387] nobu:r45466 (trunk): test_member.rb: fix locale depending test failure

nobu	2014-03-29 07:43:22 +0900 (Sat, 29 Mar 2014)

  New Revision: 45466

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

  Log:
    test_member.rb: fix locale depending test failure
    
    * test/-ext-/struct/test_member.rb (test_member_get): set
      default_external encoding to fix locale depending test failure.

  Modified files:
    trunk/test/-ext-/struct/test_member.rb
Index: test/-ext-/struct/test_member.rb
===================================================================
--- test/-ext-/struct/test_member.rb	(revision 45465)
+++ test/-ext-/struct/test_member.rb	(revision 45466)
@@ -1,5 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/test/-ext-/struct/test_member.rb#L1
 require 'test/unit'
 require "-test-/struct"
+require_relative '../../ruby/envutil'
 
 class  Bug::Struct::Test_Member < Test::Unit::TestCase
   S = Bug::Struct.new(:a)
@@ -8,6 +9,8 @@ class  Bug::Struct::Test_Member < Test:: https://github.com/ruby/ruby/blob/trunk/test/-ext-/struct/test_member.rb#L9
     s = S.new(1)
     assert_equal(1, s.get(:a))
     assert_raise_with_message(NameError, /is not a struct member/) {s.get(:b)}
-    assert_raise_with_message(NameError, /\u{3042}/) {s.get(:"\u{3042}")}
+    EnvUtil.with_default_external(Encoding::UTF_8) do
+      assert_raise_with_message(NameError, /\u{3042}/) {s.get(:"\u{3042}")}
+    end
   end
 end

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

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