diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-07-15 21:30:15 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-07-15 21:32:04 +0900 |
commit | 33bea3bdff3b91b3373a85a5c077361073b127d8 (patch) | |
tree | 9cd89b6543831e8e597b88d71ef8cb13c90a894c /struct.c | |
parent | 835c63cd8818dfa86bce54d818c11cbec25b1285 (diff) |
Regularize keyword_init values not to hold the argument object
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -604,6 +604,9 @@ rb_struct_s_def(int argc, VALUE *argv, VALUE klass) if (keyword_init == Qundef) { keyword_init = Qnil; } + else if (RTEST(keyword_init)) { + keyword_init = Qtrue; + } --argc; } |