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

ruby-changes:66795

From: Nobuyoshi <ko1@a...>
Date: Thu, 15 Jul 2021 22:27:25 +0900 (JST)
Subject: [ruby-changes:66795] 33bea3bdff (master): Regularize keyword_init values not to hold the argument object

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

From 33bea3bdff3b91b3373a85a5c077361073b127d8 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 15 Jul 2021 21:30:15 +0900
Subject: Regularize keyword_init values not to hold the argument object

---
 struct.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/struct.c b/struct.c
index 09cce01..1284fd4 100644
--- a/struct.c
+++ b/struct.c
@@ -604,6 +604,9 @@ rb_struct_s_def(int argc, VALUE *argv, VALUE klass) https://github.com/ruby/ruby/blob/trunk/struct.c#L604
         if (keyword_init == Qundef) {
             keyword_init = Qnil;
         }
+        else if (RTEST(keyword_init)) {
+            keyword_init = Qtrue;
+        }
 	--argc;
     }
 
-- 
cgit v1.1


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

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