[前][次][番号順一覧][スレッド一覧]

ruby-changes:67030

From: Peter <ko1@a...>
Date: Wed, 4 Aug 2021 05:39:24 +0900 (JST)
Subject: [ruby-changes:67030] c463a5e008 (master): Fix indentation in string.c

https://git.ruby-lang.org/ruby.git/commit/?id=c463a5e008

From c463a5e00830380fe29ffeb543aaeb59b0af02b1 Mon Sep 17 00:00:00 2001
From: Peter Zhu <peter.zhu@s...>
Date: Tue, 3 Aug 2021 16:33:34 -0400
Subject: Fix indentation in string.c

7 spaces were used for 2 levels of indentation. This commit changes it
to use 8 spaces.
---
 string.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/string.c b/string.c
index 2048b5b..0575aa8 100644
--- a/string.c
+++ b/string.c
@@ -2117,15 +2117,15 @@ rb_str_times(VALUE str, VALUE times) https://github.com/ruby/ruby/blob/trunk/string.c#L2117
 	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");
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]