From 31230ec3de8249cb2a0d1fb11ae87853b2d2edd4 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 4 Jun 2002 07:34:19 +0000 Subject: * 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: http://svn.ruby-lang.org/repos/ruby/trunk@2517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sprintf.c') diff --git a/sprintf.c b/sprintf.c index 5f0aeba39..bceaf17a3 100644 --- a/sprintf.c +++ b/sprintf.c @@ -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; -- cgit