summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-14 06:54:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-14 06:54:27 +0000
commit3f4472433d09fbeedaa9c41c7d76eb1299e31638 (patch)
treea4ad2e83d82088c8cd076830e3b25031d6ed061b /sample
parentd39d90f86ae5b61530dd76689921f31505290272 (diff)
* bignum.c (rb_cstr_to_inum, rb_big2str): allow 2-36 as radix.
* numeric.c (rb_fix2str): ditto. * string.c (rb_str_to_i): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb
index b41ac7c..0abf999 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -1181,6 +1181,12 @@ s = <<EOS
}
EOS
test_ok(s == "1,2,3\n")
+test_ok("Just".to_i(36) == 926381)
+test_ok("-another".to_i(36) == -23200231779)
+test_ok(1299022.to_s(36) == "ruby")
+test_ok(-1045307475.to_s(36) == "-hacker")
+test_ok("Just_another_Ruby_hacker".to_i(36) == 265419172580680477752431643787347)
+test_ok(-265419172580680477752431643787347.to_s(36) == "-justanotherrubyhacker")
test_check "assignment"
a = nil