diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-28 06:06:20 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-28 06:06:20 +0000 |
commit | 1521f9331e2aa74fd3248d9cb5392735a2eb36cc (patch) | |
tree | 050c2adb540083ec103192e102642e147d77e778 /marshal.c | |
parent | 113c6d58e70dc426e6bd20b4d42043985b9ef43f (diff) | |
download | ruby-1521f9331e2aa74fd3248d9cb5392735a2eb36cc.tar.gz |
* marshal.c (r_symreal): default to ASCII-8BIT for non-ascii symbols,
otherwise it should be converted to US-ASCII in rb_intern_str() if
possible. [ruby-core:43762][Bug #6209]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r-- | marshal.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1161,8 +1161,7 @@ r_symreal(struct load_arg *arg, int ivar) idx = id2encidx(id, r_object(arg)); } } - if (idx < 0) idx = rb_usascii_encindex(); - rb_enc_associate_index(s, idx); + if (idx > 0) rb_enc_associate_index(s, idx); id = rb_intern_str(s); st_insert(arg->symbols, (st_data_t)n, (st_data_t)id); |