diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-04-21 16:29:56 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-04-21 16:29:56 -0700 |
commit | e142f2c5db4427be70d10d7e1316e139d08a7c3e (patch) | |
tree | 911deab5c0939d29185cd120e8a2790527066c4c | |
parent | a0ee3ba2d08acb423a1cbc4a5ae862bd40c4b914 (diff) | |
download | clogger-e142f2c5db4427be70d10d7e1316e139d08a7c3e.tar.gz |
The return value of rb_inspect() may not be visible on the stack without assigning it to a local variable first.
-rw-r--r-- | ext/clogger_ext/clogger.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/clogger_ext/clogger.c b/ext/clogger_ext/clogger.c index 453ff48..8d3bce8 100644 --- a/ext/clogger_ext/clogger.c +++ b/ext/clogger_ext/clogger.c @@ -709,12 +709,14 @@ static VALUE ccall(struct clogger *c, VALUE env) rb_ary_store(rv, 1, c->headers); } } else { + volatile VALUE tmp = rb_inspect(rv); + c->status = INT2FIX(500); c->headers = c->body = rb_ary_new(); cwrite(c); rb_raise(rb_eTypeError, "app response not a 3 element Array: %s", - RSTRING_PTR(rb_inspect(rv))); + RSTRING_PTR(tmp)); } return rv; |