summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-02-26 02:52:37 +0000
committerEric Wong <normalperson@yhbt.net>2013-02-26 02:52:37 +0000
commitf7ee06592d7709e96f64efb5e7a9485b54415c9d (patch)
treee3398fbabadea22645141426ddb8be10e9e2e10e
parent3ef703179891fa3f6f9d03f2ae58d289c691738e (diff)
Our rb_str_modify() became no-ops due to incomplete reverts
of workarounds for old Rubinius, causing rb_str_set_len to
fail with: can't set length of shared string (RuntimeError)

This bug was introduced due to improper workarounds for old
versions of Rubinius in 2009 and 2010:

commit 5e8979ad38efdc4de3a69cc53aea33710d478406
("http: cleanups for latest Rubinius")
commit f37c23704cb73d57e9e478295d1641df1d9104c7
("http: no-op rb_str_modify() for Rubies without it")
-rw-r--r--ext/unicorn_http/ext_help.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/ext/unicorn_http/ext_help.h b/ext/unicorn_http/ext_help.h
index 0968080..c87c272 100644
--- a/ext/unicorn_http/ext_help.h
+++ b/ext/unicorn_http/ext_help.h
@@ -52,10 +52,6 @@ static void rb_18_str_set_len(VALUE str, long len)
 #  endif
 #endif /* ! defined(NUM2SIZET) */
 
-#ifndef HAVE_RB_STR_MODIFY
-#  define rb_str_modify(x) do {} while (0)
-#endif /* ! defined(HAVE_RB_STR_MODIFY) */
-
 static inline int str_cstr_eq(VALUE val, const char *ptr, long len)
 {
   return (RSTRING_LEN(val) == len && !memcmp(ptr, RSTRING_PTR(val), len));