mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
string.c: remove redundant call
* string.c (str_replace): remove redundant coderage copy as str_replace_shared already copys it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
502004f617
commit
9e4b24d4f3
1 changed files with 1 additions and 1 deletions
2
string.c
2
string.c
|
@ -1235,13 +1235,13 @@ str_replace(VALUE str, VALUE str2)
|
|||
RSTRING(str)->as.heap.len = len;
|
||||
RSTRING(str)->as.heap.ptr = RSTRING_PTR(str2);
|
||||
STR_SET_SHARED(str, shared);
|
||||
rb_enc_cr_str_exact_copy(str, str2);
|
||||
}
|
||||
else {
|
||||
str_replace_shared(str, str2);
|
||||
}
|
||||
|
||||
OBJ_INFECT(str, str2);
|
||||
rb_enc_cr_str_exact_copy(str, str2);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue