Skip to content

Commit

Permalink
Fix indentation in string.c
Browse files Browse the repository at this point in the history
7 spaces were used for 2 levels of indentation. This commit changes it
to use 8 spaces.
  • Loading branch information
peterzhu2118 committed Aug 3, 2021
1 parent 2d4f29e commit c463a5e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions string.c
Original file line number Diff line number Diff line change
Expand Up @@ -2117,15 +2117,15 @@ rb_str_times(VALUE str, VALUE times)
rb_raise(rb_eArgError, "negative argument");
}
if (RSTRING_LEN(str) == 1 && RSTRING_PTR(str)[0] == 0) {
str2 = str_alloc(rb_cString);
if (!STR_EMBEDDABLE_P(len, 1)) {
RSTRING(str2)->as.heap.aux.capa = len;
RSTRING(str2)->as.heap.ptr = ZALLOC_N(char, (size_t)len + 1);
STR_SET_NOEMBED(str2);
}
STR_SET_LEN(str2, len);
rb_enc_copy(str2, str);
return str2;
str2 = str_alloc(rb_cString);
if (!STR_EMBEDDABLE_P(len, 1)) {
RSTRING(str2)->as.heap.aux.capa = len;
RSTRING(str2)->as.heap.ptr = ZALLOC_N(char, (size_t)len + 1);
STR_SET_NOEMBED(str2);
}
STR_SET_LEN(str2, len);
rb_enc_copy(str2, str);
return str2;
}
if (len && LONG_MAX/len < RSTRING_LEN(str)) {
rb_raise(rb_eArgError, "argument too big");
Expand Down

0 comments on commit c463a5e

Please sign in to comment.