From 58b363bf0d1f31ae9bcbaf301f9abedb99fa90f6 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Fri, 25 Oct 2019 04:37:46 +0900 Subject: [PATCH] respect `param.flags.ruby2_keywords` at to_binary. `param.flags.ruby2_keywords` is not store/load correctly at to_binary so restore this flag correctly. --- compile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compile.c b/compile.c index 278736d1b1..72b60c1144 100644 --- a/compile.c +++ b/compile.c @@ -10147,7 +10147,8 @@ ibf_dump_iseq_each(struct ibf_dump *dump, const rb_iseq_t *iseq) (body->param.flags.has_kwrest << 5) | (body->param.flags.has_block << 6) | (body->param.flags.ambiguous_param0 << 7) | - (body->param.flags.accepts_no_kwarg << 8); + (body->param.flags.accepts_no_kwarg << 8) | + (body->param.flags.ruby2_keywords << 9); #if IBF_ISEQ_ENABLE_LOCAL_BUFFER # define IBF_BODY_OFFSET(x) (x) @@ -10313,6 +10314,7 @@ ibf_load_iseq_each(struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset) load_body->param.flags.has_block = (param_flags >> 6) & 1; load_body->param.flags.ambiguous_param0 = (param_flags >> 7) & 1; load_body->param.flags.accepts_no_kwarg = (param_flags >> 8) & 1; + load_body->param.flags.ruby2_keywords = (param_flags >> 9) & 1; load_body->param.size = param_size; load_body->param.lead_num = param_lead_num; load_body->param.opt_num = param_opt_num;