aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-03 05:34:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-03 05:34:10 +0000
commit49b3b2d8a2419199d28b4c1e660483bf2c92a74b (patch)
treeb4c74e70841caae150db8aa89c623109d6298b77
parented52fa6ef9281617c0af80c4acddc28065fd3df8 (diff)
downloadruby-49b3b2d8a2419199d28b4c1e660483bf2c92a74b.tar.gz
string.c: fake string is not sharing
* string.c (setup_fake_str): fake string does not share another string, but just should not free. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--string.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 599c992b98..329988c587 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Dec 3 14:34:07 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (setup_fake_str): fake string does not share another
+ string, but just should not free.
+
Wed Dec 3 11:14:14 2014 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (w32_spawn): `v2` is used not only for `shell` but also
diff --git a/string.c b/string.c
index 88185cfb0b..95c773bf02 100644
--- a/string.c
+++ b/string.c
@@ -250,7 +250,7 @@ rb_fstring(VALUE str)
static VALUE
setup_fake_str(struct RString *fake_str, const char *name, long len, int encidx)
{
- fake_str->basic.flags = T_STRING|RSTRING_NOEMBED|ELTS_SHARED;
+ fake_str->basic.flags = T_STRING|RSTRING_NOEMBED|STR_NOFREE;
/* SHARED to be allocated by the callback */
ENCODING_SET_INLINED((VALUE)fake_str, encidx);