ruby-changes:39749
From: nobu <ko1@a...>
Date: Sat, 12 Sep 2015 13:48:46 +0900 (JST)
Subject: [ruby-changes:39749] nobu:r51830 (trunk): test_rational.rb: fix default external
nobu 2015-09-12 13:48:36 +0900 (Sat, 12 Sep 2015) New Revision: 51830 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51830 Log: test_rational.rb: fix default external * test/ruby/test_rational.rb (test_conv): fix default external encoding, which affects inspect results. Modified files: trunk/test/ruby/test_rational.rb Index: test/ruby/test_rational.rb =================================================================== --- test/ruby/test_rational.rb (revision 51829) +++ test/ruby/test_rational.rb (revision 51830) @@ -110,7 +110,11 @@ class Rational_Test < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rational.rb#L110 assert_equal(Rational(1),Rational('3/3','3/3')) assert_raise(TypeError){Rational(nil)} assert_raise(ArgumentError){Rational('')} - assert_raise_with_message(ArgumentError, /\u{221a 2668}/) {Rational("\u{221a 2668}")} + assert_raise_with_message(ArgumentError, /\u{221a 2668}/) { + EnvUtil.with_default_external(Encoding::UTF_8) { + Rational("\u{221a 2668}") + } + } assert_raise(TypeError){Rational(Object.new)} assert_raise(ArgumentError){Rational()} assert_raise(ArgumentError){Rational(1,2,3)} -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/