diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-09 01:04:29 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-09 01:04:29 +0000 |
| commit | ab2128729fd387e44d6c791a6132abdad2c25a76 (patch) | |
| tree | 465e8f513fbf25d2b75bf8faf5697050017ef21b /string.c | |
| parent | 857620d82dd6148d002b620c7c4a0c068771a48a (diff) | |
| download | ruby-ab2128729fd387e44d6c791a6132abdad2c25a76.tar.gz ruby-ab2128729fd387e44d6c791a6132abdad2c25a76.tar.xz ruby-ab2128729fd387e44d6c791a6132abdad2c25a76.zip | |
* string.c (rb_str_new4): copy encoding from orig, instead of shared
one.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
| -rw-r--r-- | string.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -425,6 +425,7 @@ rb_str_new4(VALUE orig) RSTRING(str)->as.heap.ptr += ofs; RSTRING(str)->as.heap.len -= ofs; } + rb_enc_copy(str, orig); OBJ_INFECT(str, orig); } else if (STR_EMBED_P(orig)) { |
