mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Regularize keyword_init values not to hold the argument object
This commit is contained in:
parent
835c63cd88
commit
33bea3bdff
1 changed files with 3 additions and 0 deletions
3
struct.c
3
struct.c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue