mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02: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:
parent
b42179135d
commit
d66a188c4a
2 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue