diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-04 07:34:19 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-04 07:34:19 +0000 |
commit | b7bc0cae539617af4dfac5b44b0ebd700efe2084 (patch) | |
tree | a65171fc36999a1cc3c537a0b8bf62ddd9b16f77 /sprintf.c | |
parent | 4cb164ee2a30ecb59ce93670e569f384c7da7521 (diff) | |
download | ruby-b7bc0cae539617af4dfac5b44b0ebd700efe2084.tar.gz |
* string.c (rb_str_aset): should raise error if an indexing string
is not found in the receiver.
* sprintf.c (rb_f_sprintf): "%d" should convert objects into
integers using Integer().
* lib/tempfile.rb (Tempfile::size): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r-- | sprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -349,8 +349,8 @@ rb_f_sprintf(argc, argv) v = FIX2LONG(val); break; default: - v = NUM2LONG(val); - break; + val = rb_Integer(val); + goto bin_retry; } if (*p == 'u' || *p == 'd' || *p == 'i') base = 10; |