diff options
author | John Hawthorn <john@hawthorn.email> | 2022-02-09 12:14:51 -0800 |
---|---|---|
committer | John Hawthorn <john@hawthorn.email> | 2022-02-09 17:32:43 -0800 |
commit | 05b1944c53205ffd8c11f1ec2ae6fd48485b55b1 (patch) | |
tree | d636fc8f9c26fea58e74439196833282f7e336e3 /range.c | |
parent | a271acf82284a8ee665686ab6e95df5622f4b1e2 (diff) | |
download | ruby-05b1944c53205ffd8c11f1ec2ae6fd48485b55b1.tar.gz |
objspace: Hide identhash containing internal objs
Inside ObjectSpace.reachable_objects_from we keep an internal identhash
in order to de-duplicate reachable objects when wrapping them as
InternalObject. Previously this hash was not hidden, making it possible
to leak references to those internal objects to Ruby if using
ObjectSpace.each_object.
This commit solves this by hiding the hash. To simplify collection of
values, we instead now just use the hash as a set of visited objects,
and collect an Array (not hidden) of values to be returned.
Diffstat (limited to 'range.c')
0 files changed, 0 insertions, 0 deletions