ruby-changes:71714
From: Nobuyoshi <ko1@a...>
Date: Wed, 13 Apr 2022 18:34:16 +0900 (JST)
Subject: [ruby-changes:71714] 7e97ebb6eb (master): Enforce literals on the second arguments
https://git.ruby-lang.org/ruby.git/commit/?id=7e97ebb6eb From 7e97ebb6eb392d90fc6e49a16620e71d398f4bdf Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 13 Apr 2022 09:02:32 +0900 Subject: Enforce literals on the second arguments --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/string.c b/string.c index a31d53c4c3..938edd9cdf 100644 --- a/string.c +++ b/string.c @@ -3094,7 +3094,7 @@ str_buf_cat(VALUE str, const char *ptr, long len) https://github.com/ruby/ruby/blob/trunk/string.c#L3094 return str; } -#define str_buf_cat2(str, ptr) str_buf_cat((str), (ptr), strlen(ptr)) +#define str_buf_cat2(str, ptr) str_buf_cat((str), (ptr), rb_strlen_lit(ptr)) VALUE rb_str_cat(VALUE str, const char *ptr, long len) -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/