summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2024-04-05 15:14:25 -0400
committergit <svn-admin@ruby-lang.org>2024-04-05 19:24:04 +0000
commitfbeb8f2c784806e206904887c19c392b9df0bd6e (patch)
tree30ec3c5fd3a555fcf41d8de44ae271a2b54c2f10
parent1953ead74e0ceaea83a874ae3ec0001289375247 (diff)
[ruby/prism] Set up location correctly for hashed locals
https://github.com/ruby/prism/commit/0334140790
-rw-r--r--prism/prism.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/prism/prism.c b/prism/prism.c
index d47cf204a7..086716e92b 100644
--- a/prism/prism.c
+++ b/prism/prism.c
@@ -905,6 +905,7 @@ pm_locals_write(pm_locals_t *locals, pm_constant_id_t name, const uint8_t *start
if (local->name == PM_CONSTANT_ID_UNSET) {
*local = (pm_local_t) {
.name = name,
+ .location = { .start = start, .end = end },
.index = locals->size++,
.reads = reads,
.hash = initial_hash