mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* string.c (rb_str_new4): copy encoding from orig, instead of shared
one. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
998113d62f
commit
8f9fb1a820
2 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Feb 9 10:03:07 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* string.c (rb_str_new4): copy encoding from orig, instead of shared
|
||||||
|
one.
|
||||||
|
|
||||||
Sat Feb 09 01:01:38 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
Sat Feb 09 01:01:38 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* file.c (lchmod_internal): fix warning cast from pointer to integer of
|
* file.c (lchmod_internal): fix warning cast from pointer to integer of
|
||||||
|
|
1
string.c
1
string.c
|
@ -425,6 +425,7 @@ rb_str_new4(VALUE orig)
|
||||||
RSTRING(str)->as.heap.ptr += ofs;
|
RSTRING(str)->as.heap.ptr += ofs;
|
||||||
RSTRING(str)->as.heap.len -= ofs;
|
RSTRING(str)->as.heap.len -= ofs;
|
||||||
}
|
}
|
||||||
|
rb_enc_copy(str, orig);
|
||||||
OBJ_INFECT(str, orig);
|
OBJ_INFECT(str, orig);
|
||||||
}
|
}
|
||||||
else if (STR_EMBED_P(orig)) {
|
else if (STR_EMBED_P(orig)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue