aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-05 03:14:23 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-05 03:14:23 +0000
commit46fcec9a17919302dd7f9b15e6a4aa86d4ee4570 (patch)
tree2a0009e4b1f1f2008023d48b16187689b6983f9f /string.c
parent906e88e376e9933e9664b477bc86357a9cd01bda (diff)
downloadruby-46fcec9a17919302dd7f9b15e6a4aa86d4ee4570.tar.gz
* string.c (RESIZE_CAPA): should not resize shared string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index 86ae2bf6db..5df2ca38c0 100644
--- a/string.c
+++ b/string.c
@@ -107,9 +107,9 @@ VALUE rb_cSymbol;
}\
}\
else {\
+ assert(!FL_TEST((str), STR_SHARED)); \
REALLOC_N(RSTRING(str)->as.heap.ptr, char, (capacity)+termlen);\
- if (!STR_NOCAPA_P(str))\
- RSTRING(str)->as.heap.aux.capa = (capacity);\
+ RSTRING(str)->as.heap.aux.capa = (capacity);\
}\
} while (0)