diff --git a/ChangeLog b/ChangeLog index 4f0f7c9724..c15ffe171e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Dec 8 14:31:36 2004 Yukihiro Matsumoto + + * sprintf.c (rb_f_sprintf): [ruby-dev:25104] + Wed Dec 8 13:49:46 2004 NAKAMURA Usaku * win32/win32.c (rb_w32_pipe_exec): must close original handle diff --git a/sprintf.c b/sprintf.c index 16f9c35a3e..97c392816b 100644 --- a/sprintf.c +++ b/sprintf.c @@ -249,6 +249,7 @@ rb_f_sprintf(argc, argv) fmt = GETNTHARG(0); if (OBJ_TAINTED(fmt)) tainted = 1; StringValue(fmt); + fmt = rb_str_new4(fmt); p = RSTRING(fmt)->ptr; end = p + RSTRING(fmt)->len; blen = 0;