diff options
author | Peter Zhu <[email protected]> | 2024-09-18 16:40:18 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-09-19 14:51:21 -0400 |
commit | 7a2b5ed5ee10c627f5b47c7dab1f7d0681277162 (patch) | |
tree | cd5a72dd945766b643cc6a798e9f8a2de7811c0a /prism_compile.c | |
parent | dc64448202299633a235f310b8bf2192263f274f (diff) |
Replace RB_OBJ_WRITTEN with RB_OBJ_WRITE in pm_compile_scope_node
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11647
Diffstat (limited to 'prism_compile.c')
-rw-r--r-- | prism_compile.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/prism_compile.c b/prism_compile.c index 76d4e05fbe..1fbae42cf8 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -6391,10 +6391,7 @@ pm_compile_scope_node(rb_iseq_t *iseq, pm_scope_node_t *scope_node, const pm_nod for (int i = 0; i < RARRAY_LEN(default_values); i++) { VALUE dv = RARRAY_AREF(default_values, i); if (dv == complex_mark) dv = Qundef; - if (!SPECIAL_CONST_P(dv)) { - RB_OBJ_WRITTEN(iseq, Qundef, dv); - } - dvs[i] = dv; + RB_OBJ_WRITE(iseq, &dvs[i], dv); } keyword->default_values = dvs; |