summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-26 11:30:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-26 11:30:54 +0000
commitbb1d0d280781b6bf0b9798f8603208c2ef8b1459 (patch)
tree7df6d45b25ca9f9cf59adc952fadf51f8508fe71 /parse.y
parente8de850e6d5f9c4d9928753862b4a18147be8983 (diff)
parse.y: set encoding
* parse.y (rb_str_dynamic_intern): associate proper encoding with the result symbol. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index a9a2aac33d..1977a5fd04 100644
--- a/parse.y
+++ b/parse.y
@@ -10685,12 +10685,14 @@ rb_str_dynamic_intern(VALUE str)
str = rb_str_dup(str);
rb_enc_associate(str, ascii);
OBJ_FREEZE(str);
+ enc = ascii;
}
}
type = rb_str_symname_type(str, IDSET_ATTRSET_FOR_INTERN);
str = rb_fstring(str);
dsym = rb_newobj_of(rb_cSymbol, T_SYMBOL);
+ rb_enc_associate(dsym, enc);
OBJ_FREEZE(dsym);
RSYMBOL(dsym)->fstr = str;
RSYMBOL(dsym)->type = type;