diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-26 11:14:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-26 11:14:44 +0000 |
commit | e8de850e6d5f9c4d9928753862b4a18147be8983 (patch) | |
tree | 21f5334a96e4e7279048d6db4290d831470275c3 /encoding.c | |
parent | 2d8c3e78516525c2899e6d2a39f9e8cc82b10fc7 (diff) |
encoding.c: fix encoding of dynsym
* encoding.c (rb_enc_get_index): the encoding of dynamic symbol
comes from fstr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/encoding.c b/encoding.c index df3d65cd48..b1afc87bd2 100644 --- a/encoding.c +++ b/encoding.c @@ -747,6 +747,9 @@ rb_enc_get_index(VALUE obj) obj = rb_id2str(SYM2ID(obj)); } switch (BUILTIN_TYPE(obj)) { + case T_SYMBOL: + obj = RSYMBOL(obj)->fstr; + /* fall through */ as_default: default: case T_STRING: |