mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
variable.c: Fix rb_ivar_foreach
to not yield object_id
of complex objects
Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
This commit is contained in:
parent
bf2c8ad383
commit
fca2e6f8f5
2 changed files with 27 additions and 0 deletions
|
@ -2255,6 +2255,9 @@ each_hash_iv(st_data_t id, st_data_t val, st_data_t data)
|
|||
{
|
||||
struct iv_itr_data * itr_data = (struct iv_itr_data *)data;
|
||||
rb_ivar_foreach_callback_func *callback = itr_data->func;
|
||||
if (is_internal_id((ID)id)) {
|
||||
return ST_CONTINUE;
|
||||
}
|
||||
return callback((ID)id, (VALUE)val, itr_data->arg);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue