diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-13 04:21:33 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-13 04:21:33 +0000 |
commit | ec1f2095a1e0b600e5225b86558f31472f76a6fa (patch) | |
tree | 14c531de8c10ddd414007b51e2cb7e8abc2e1c33 /test | |
parent | 5f0e8f582bb1b84ac67d45f8c4e1637cb184b626 (diff) | |
download | ruby-ec1f2095a1e0b600e5225b86558f31472f76a6fa.tar.gz |
check the chracters in (10**32768-1).to_s.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_bignum.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb index d2d6f1f2cf..d7ace9d55d 100644 --- a/test/ruby/test_bignum.rb +++ b/test/ruby/test_bignum.rb @@ -163,7 +163,9 @@ class TestBignum < Test::Unit::TestCase def test_to_s2 assert_raise(ArgumentError) { T31P.to_s(37) } - assert_equal(32768, (10**32768-1).to_s.size) + str = (10**32768-1).to_s + assert_equal("q", str.tr_s("9", "q")) + assert_equal(32768, str.size) assert_raise(RangeError) { Process.wait(1, T64P) } assert_equal("0", T_ZERO.to_s) assert_equal("1", T_ONE.to_s) |