diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-04-14 06:54:27 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-04-14 06:54:27 +0000 |
| commit | abf7b14f052fca72777a745c5f1b3f4621e677b2 (patch) | |
| tree | a4ad2e83d82088c8cd076830e3b25031d6ed061b /sample | |
| parent | 46ce70991083b08da365ac980bebbc5d7e2bcec2 (diff) | |
| download | ruby-abf7b14f052fca72777a745c5f1b3f4621e677b2.tar.gz ruby-abf7b14f052fca72777a745c5f1b3f4621e677b2.tar.xz ruby-abf7b14f052fca72777a745c5f1b3f4621e677b2.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@3677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
| -rw-r--r-- | sample/test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb index b41ac7c9c..0abf999e3 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 |
