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:
parent
b42179135d
commit
d66a188c4a
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Dec 21 17:49:06 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* transcode.c (rb_str_transcode_bang): returns self if no conversion.
|
||||||
|
[ruby-dev:32662]
|
||||||
|
|
||||||
Fri Dec 21 17:44:47 2007 Eric Hodel <drbrain@segment7.net>
|
Fri Dec 21 17:44:47 2007 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* lib/rubygems*: Update to RubyGems 1.0.1, r1581
|
* lib/rubygems*: Update to RubyGems 1.0.1, r1581
|
||||||
|
|
|
@ -370,7 +370,7 @@ rb_str_transcode_bang(int argc, VALUE *argv, VALUE str)
|
||||||
VALUE newstr = str;
|
VALUE newstr = str;
|
||||||
int encidx = str_transcode(argc, argv, &newstr);
|
int encidx = str_transcode(argc, argv, &newstr);
|
||||||
|
|
||||||
if (encidx < 0) return Qnil;
|
if (encidx < 0) return str;
|
||||||
rb_str_shared_replace(str, newstr);
|
rb_str_shared_replace(str, newstr);
|
||||||
rb_enc_associate_index(str, encidx);
|
rb_enc_associate_index(str, encidx);
|
||||||
return str;
|
return str;
|
||||||
|
|
Loading…
Reference in a new issue