1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* transcode.c (rb_str_transcode_bang): returns self if no conversion.

[ruby-dev:32662]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-12-21 08:49:08 +00:00
parent b42179135d
commit d66a188c4a
2 changed files with 6 additions and 1 deletions

View file

@ -370,7 +370,7 @@ rb_str_transcode_bang(int argc, VALUE *argv, VALUE str)
VALUE newstr = str;
int encidx = str_transcode(argc, argv, &newstr);
if (encidx < 0) return Qnil;
if (encidx < 0) return str;
rb_str_shared_replace(str, newstr);
rb_enc_associate_index(str, encidx);
return str;