ruby-changes:4908
From: ko1@a...
Date: Tue, 13 May 2008 13:21:41 +0900 (JST)
Subject: [ruby-changes:4908] akr - Ruby:r16401 (trunk): check the chracters in (10**32768-1).to_s.
akr 2008-05-13 13:21:33 +0900 (Tue, 13 May 2008)
New Revision: 16401
Modified files:
trunk/test/ruby/test_bignum.rb
Log:
check the chracters in (10**32768-1).to_s.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_bignum.rb?r1=16401&r2=16400&diff_format=u
Index: test/ruby/test_bignum.rb
===================================================================
--- test/ruby/test_bignum.rb (revision 16400)
+++ test/ruby/test_bignum.rb (revision 16401)
@@ -163,7 +163,9 @@
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)
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/