mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* fix for (rb_enc_get_index(obj) == idx) case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
102f94455c
commit
19337db497
1 changed files with 1 additions and 1 deletions
|
@ -569,7 +569,7 @@ rb_enc_associate_index(VALUE obj, int idx)
|
||||||
{
|
{
|
||||||
/* enc_check_capable(obj);*/
|
/* enc_check_capable(obj);*/
|
||||||
if (rb_enc_get_index(obj) == idx)
|
if (rb_enc_get_index(obj) == idx)
|
||||||
return;
|
return obj;
|
||||||
if (!ENC_CODERANGE_ASCIIONLY(obj) ||
|
if (!ENC_CODERANGE_ASCIIONLY(obj) ||
|
||||||
!rb_enc_asciicompat(rb_enc_from_index(idx))) {
|
!rb_enc_asciicompat(rb_enc_from_index(idx))) {
|
||||||
ENC_CODERANGE_CLEAR(obj);
|
ENC_CODERANGE_CLEAR(obj);
|
||||||
|
|
Loading…
Add table
Reference in a new issue