diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-30 02:33:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-30 02:33:38 +0000 |
commit | 950508e9b73543c4ec1846b3b7887613e9defc20 (patch) | |
tree | 06323c8c9b41a7e33eeb99e6c1fa113f116303bc /string.c | |
parent | 361978beb23c00670679252bd9a0f8f9720e618d (diff) | |
download | ruby-950508e9b73543c4ec1846b3b7887613e9defc20.tar.gz |
string.c: reset code range
* string.c (rb_str_substr): need to reset code range for shared
string too, not only copied string.
[ruby-core:62842] [Bug #9882]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1894,10 +1894,10 @@ rb_str_substr(VALUE str, long beg, long len) } else { str2 = rb_str_new_with_class(str, p, len); - rb_enc_cr_str_copy_for_substr(str2, str); OBJ_INFECT(str2, str); RB_GC_GUARD(str); } + rb_enc_cr_str_copy_for_substr(str2, str); return str2; } |