From 6524f34a2688436249d111a3456a097c7111722c Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 23 Jul 2005 01:02:18 +0000 Subject: * sprintf.c (rb_vsprintf, rb_sprintf): new functions return new String, using missing/vsnprintf.c. [ruby-dev:26580] * missing/vsnprintf.c: made the output changeable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index d743b76765..3ac72387b0 100644 --- a/parse.y +++ b/parse.y @@ -8904,13 +8904,13 @@ ripper_compile_error(parser, fmt, va_alist) va_dcl #endif { - char buf[BUFSIZ]; + VALUE str; va_list args; va_init_list(args, fmt); - vsnprintf(buf, BUFSIZ, fmt, args); + str = rb_vsprintf(fmt, args); va_end(args); - rb_funcall(parser->value, rb_intern("compile_error"), 1, rb_str_new2(buf)); + rb_funcall(parser->value, rb_intern("compile_error"), 1, str); } static void -- cgit v1.2.3