diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-09-15 01:14:18 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-09-15 01:14:18 -0700 |
commit | 7ad9fd8b217eedd7cab2dc9e1dd5475244d16957 (patch) | |
tree | 745c92d2eb7a3d8e270636fe071d4001dc203dde /ext/unicorn_http/unicorn_http.rl | |
parent | 3766ae735635eabafeeb73f44c2bc19e5ca180a6 (diff) | |
download | unicorn-7ad9fd8b217eedd7cab2dc9e1dd5475244d16957.tar.gz |
assert_frozen() should not be checking what type of object it is, instead put an extra assertion in there to ensure we have a string.
Diffstat (limited to 'ext/unicorn_http/unicorn_http.rl')
-rw-r--r-- | ext/unicorn_http/unicorn_http.rl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/unicorn_http/unicorn_http.rl b/ext/unicorn_http/unicorn_http.rl index 39dbd45..5cacb37 100644 --- a/ext/unicorn_http/unicorn_http.rl +++ b/ext/unicorn_http/unicorn_http.rl @@ -192,6 +192,7 @@ static void write_value(VALUE req, struct http_parser *hp, HP_FL_SET(hp, HASTRAILER); hp_invalid_if_trailer(hp); } else { + assert(TYPE(f) == T_STRING && "memoized object is not a string"); assert_frozen(f); } |