diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-27 04:13:54 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-27 04:13:54 +0000 |
commit | ab9c982cc0299435a795000d68eb9472d8ecfde0 (patch) | |
tree | dcc891fa639942f22127f5f027604931556efc9c /string.c | |
parent | 9052a8cd948840068c8a6a51850f421fff11c887 (diff) | |
download | ruby-ab9c982cc0299435a795000d68eb9472d8ecfde0.tar.gz |
* string.c (str_new_empty): should copy also the encoding as an
empty substring. [ruby-dev:45441][Bug #6206]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -726,6 +726,7 @@ static VALUE str_new_empty(VALUE str) { VALUE v = rb_str_new5(str, 0, 0); + rb_enc_copy(v, str); OBJ_INFECT(v, str); return v; } |