about summary refs log tree commit homepage
path: root/ext/unicorn_http/ext_help.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/unicorn_http/ext_help.h')
-rw-r--r--ext/unicorn_http/ext_help.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/unicorn_http/ext_help.h b/ext/unicorn_http/ext_help.h
index 8df2d80..d1b71d6 100644
--- a/ext/unicorn_http/ext_help.h
+++ b/ext/unicorn_http/ext_help.h
@@ -8,12 +8,18 @@
 #define RSTRING_LEN(s) (RSTRING(s)->len)
 #endif
 
+#ifndef RUBINIUS
+#  define rb_str_update(x) do {} while (0)
+#  define rb_str_flush(x) do {} while (0)
+#endif /* !RUBINIUS */
+
 #ifndef HAVE_RB_STR_SET_LEN
 /* this is taken from Ruby 1.8.7, 1.8.6 may not have it */
 static void rb_18_str_set_len(VALUE str, long len)
 {
   RSTRING(str)->len = len;
   RSTRING(str)->ptr[len] = '\0';
+  rb_str_flush(str);
 }
 #  define rb_str_set_len(str,len) rb_18_str_set_len(str,len)
 #endif