diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-12 04:48:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-12 04:48:36 +0000 |
commit | 78f7e342d156ee139aec307225e7c37e17cef1ff (patch) | |
tree | 7240d80fb9d5bde7778c959c09644fd64f2969ad /test/ruby/test_rational.rb | |
parent | 7a0981facc7ea33aacba0c5129e8d8eefdcade4a (diff) | |
download | ruby-78f7e342d156ee139aec307225e7c37e17cef1ff.tar.gz |
test_rational.rb: fix default external
* test/ruby/test_rational.rb (test_conv): fix default external
encoding, which affects inspect results.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rational.rb')
-rw-r--r-- | test/ruby/test_rational.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb index 3abfef1ca6..f922d89533 100644 --- a/test/ruby/test_rational.rb +++ b/test/ruby/test_rational.rb @@ -110,7 +110,11 @@ class Rational_Test < Test::Unit::TestCase 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)} |