diff options
| author | nagachika <nagachika@ruby-lang.org> | 2025-03-16 13:10:13 +0900 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2025-03-16 13:10:13 +0900 |
| commit | ac3f355fb33f4ce41df864f2084028610b7b38d1 (patch) | |
| tree | f1aa6558137691552343bc59f0f325592dd274b8 | |
| parent | e860cb2267cd17aef9a5e8e977d03410c213d6a2 (diff) | |
Silently ignore keyword args for attr-asign method to cease segmentation fault.
| -rw-r--r-- | compile.c | 3 | ||||
| -rw-r--r-- | version.h | 2 |
2 files changed, 3 insertions, 2 deletions
@@ -9666,6 +9666,7 @@ compile_attrasgn(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node VALUE argc; LABEL *else_label = NULL; VALUE branches = Qfalse; + struct rb_callinfo_kwarg *keywords = NULL; /* optimization shortcut * obj["literal"] = value -> opt_aset_with(obj, "literal", value) @@ -9694,7 +9695,7 @@ compile_attrasgn(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node INIT_ANCHOR(recv); INIT_ANCHOR(args); - argc = setup_args(iseq, args, RNODE_ATTRASGN(node)->nd_args, &flag, NULL); + argc = setup_args(iseq, args, RNODE_ATTRASGN(node)->nd_args, &flag, &keywords); CHECK(!NIL_P(argc)); int asgnflag = COMPILE_RECV(recv, "recv", node, RNODE_ATTRASGN(node)->nd_recv); @@ -11,7 +11,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 7 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 128 +#define RUBY_PATCHLEVEL 129 #include "ruby/version.h" #include "ruby/internal/abi.h" |
