summaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-23 01:02:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-23 01:02:18 +0000
commit57fb7655357ccd8a0a72cb70f230fa44e743e14d (patch)
treef9c83bf95a7873e01e38ff396a8bc5490b61162c /process.c
parent206a6456f7fd9ce4d5ce7c862418d54c19457e18 (diff)
downloadruby-57fb7655357ccd8a0a72cb70f230fa44e743e14d.tar.gz
ruby-57fb7655357ccd8a0a72cb70f230fa44e743e14d.tar.xz
ruby-57fb7655357ccd8a0a72cb70f230fa44e743e14d.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@8825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/process.c b/process.c
index 6e10e7eb3..2a865de9b 100644
--- a/process.c
+++ b/process.c
@@ -280,8 +280,7 @@ pst_inspect(st)
pid = pst_pid(st);
status = NUM2INT(st);
- snprintf(buf, sizeof(buf), "#<%s: pid=%ld", rb_class2name(CLASS_OF(st)), NUM2LONG(pid));
- str = rb_str_new2(buf);
+ str = rb_sprintf("#<%s: pid=%ld", rb_class2name(CLASS_OF(st)), NUM2LONG(pid));
if (WIFSTOPPED(status)) {
int stopsig = WSTOPSIG(status);
const char *signame = ruby_signal_name(stopsig);