Revert "Optimization for String#* for 1-byte strings"

This reverts commit d1bc7caeca.
This commit is contained in:
Tomasz Dabrowski
2017-02-11 13:02:48 +01:00
parent 642ab8ecda
commit 90f262f642
+1 -3
View File
@@ -872,9 +872,7 @@ mrb_str_times(mrb_state *mrb, mrb_value self)
str2 = str_new(mrb, 0, len);
str_with_class(mrb, str2, self);
p = RSTR_PTR(str2);
if (len == 1) {
memset(p, RSTRING_PTR(self)[0], len);
} else if (len > 0) {
if (len > 0) {
n = RSTRING_LEN(self);
memcpy(p, RSTRING_PTR(self), n);
while (n <= len/2) {