diff options
author | Eric Wong <e@80x24.org> | 2017-03-05 02:55:21 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-03-05 02:55:21 +0000 |
commit | eb6e9e5bac6ced303de5f9f8b103ef3fa31fde7c (patch) | |
tree | 51b54c41db75eff77ccf79a914f43a2a59f08fc8 | |
parent | 183ef85f8e927734e6ad4aceec89f9a17fd60e69 (diff) | |
download | kcar-eb6e9e5bac6ced303de5f9f8b103ef3fa31fde7c.tar.gz |
Comments require maintenance along with code :P
-rw-r--r-- | ext/kcar/kcar.rl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/kcar/kcar.rl b/ext/kcar/kcar.rl index cbffb7e..ef3e393 100644 --- a/ext/kcar/kcar.rl +++ b/ext/kcar/kcar.rl @@ -100,6 +100,8 @@ static VALUE str_dd_freeze(VALUE str) { if (STR_UMINUS_DEDUPE) return rb_funcall(str, id_uminus, 0); + + /* freeze,since it speeds up MRI slightly */ OBJ_FREEZE(str); return str; } @@ -294,8 +296,6 @@ static void write_value(VALUE hdr, struct http_parser *hp, e = rb_funcall(hdr, id_sq, 1, f); if (NIL_P(e)) { - /* new value, freeze it since it speeds up MRI slightly */ - if (hclass == rb_cHash) rb_hash_aset(hdr, f, v); else |