mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 12:14:51 +00:00
[ruby/prism] Correct constant pool bucket type logic
When replacing an owned constant by a different type (constant or shared) replace with the correct type instead of defaulting to shared. https://github.com/ruby/prism/commit/fbe9b131a1
This commit is contained in:
parent
be12e19856
commit
786f673938
@ -264,7 +264,7 @@ pm_constant_pool_insert(pm_constant_pool_t *pool, const uint8_t *start, size_t l
|
||||
// constant and replace it with the shared constant.
|
||||
xfree((void *) constant->start);
|
||||
constant->start = start;
|
||||
bucket->type = (unsigned int) (PM_CONSTANT_POOL_BUCKET_DEFAULT & 0x3);
|
||||
bucket->type = (unsigned int) (type & 0x3);
|
||||
}
|
||||
|
||||
return bucket->id;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user