summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2025-03-16 13:10:13 +0900
committernagachika <nagachika@ruby-lang.org>2025-03-16 13:10:13 +0900
commitac3f355fb33f4ce41df864f2084028610b7b38d1 (patch)
treef1aa6558137691552343bc59f0f325592dd274b8
parente860cb2267cd17aef9a5e8e977d03410c213d6a2 (diff)
Silently ignore keyword args for attr-asign method to cease segmentation fault.
-rw-r--r--compile.c3
-rw-r--r--version.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index f9738867b7..110530f89f 100644
--- a/compile.c
+++ b/compile.c
@@ -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);
diff --git a/version.h b/version.h
index 1623f73fdf..5a6e060a2e 100644
--- a/version.h
+++ b/version.h
@@ -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"