diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-12 08:11:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-12 08:11:36 +0000 |
commit | 9bd672f6682aef683c49f0b8da2b439e4d4103ac (patch) | |
tree | 17a6f91b7e705c4ba7bf32e6ceadd136e7b595f5 /ext/pty | |
parent | 42406852371bdf3fe3d2e4e51192c87720a8e568 (diff) | |
download | ruby-9bd672f6682aef683c49f0b8da2b439e4d4103ac.tar.gz |
ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUE
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty')
-rw-r--r-- | ext/pty/pty.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 4ba1cba621..f54bbb52e5 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -613,7 +613,7 @@ static void raise_from_check(rb_pid_t pid, int status) { const char *state; - char buf[1024]; + VALUE msg; VALUE exc; #if defined(WIFSTOPPED) @@ -631,8 +631,8 @@ raise_from_check(rb_pid_t pid, int status) else { state = "exited"; } - snprintf(buf, sizeof(buf), "pty - %s: %ld", state, (long)pid); - exc = rb_exc_new2(eChildExited, buf); + msg = rb_sprintf("pty - %s: %ld", state, (long)pid); + exc = rb_exc_new_str(eChildExited, msg); rb_iv_set(exc, "status", rb_last_status_get()); rb_exc_raise(exc); } |