summaryrefslogtreecommitdiff
path: root/symbol.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-15 10:37:42 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-15 10:37:42 (GMT)
commit6f7366c2064eb42231500e17ee3b3e5d55701f3f (patch)
treeb05757c175509e84edab2e8dd355fd62283b5fd4 /symbol.c
parentb5e89e44f12a6e3a42e9515d1d3705d11f9442bf (diff)
* string.c (setup_fake_str): fake strings should not set class by
RBASIC_SET_CLASS() because it insert write barriers to fake (non-RVALUE) structure. It can cause unexpected behaviour. Ruby 2.1 also have a same problem (setup_fake_str() in parse.y). * symbol.c (setup_fake_str): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/symbol.c b/symbol.c
index 99c7512..c50607b 100644
--- a/symbol.c
+++ b/symbol.c
@@ -414,7 +414,7 @@ static VALUE
setup_fake_str(struct RString *fake_str, const char *name, long len)
{
fake_str->basic.flags = T_STRING|RSTRING_NOEMBED;
- RBASIC_SET_CLASS((VALUE)fake_str, rb_cString);
+ RBASIC_SET_CLASS_RAW((VALUE)fake_str, rb_cString);
fake_str->as.heap.len = len;
fake_str->as.heap.ptr = (char *)name;
fake_str->as.heap.aux.capa = len;