diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-03-20 23:53:57 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-03-20 23:53:57 +0900 |
commit | cfadbf2fc4a6547f6e0bd47b8103c5b4bbd17b20 () | |
tree | 3868307290f2a2e5cc8a90b4701f642ef0427c89 /enum.c | |
parent | 0b6554e65b902a977012150ba3ae2b170a3c061e (diff) |
Add write-barrier in tally
-rw-r--r-- | enum.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1012,6 +1012,7 @@ static int tally_up(st_data_t *group, st_data_t *value, st_data_t arg, int existing) { VALUE tally = (VALUE)*value; if (!existing) { tally = INT2FIX(1); } @@ -1020,15 +1021,17 @@ tally_up(st_data_t *group, st_data_t *value, st_data_t arg, int existing) } else { tally = rb_big_plus(tally, INT2FIX(1)); } *value = (st_data_t)tally; return ST_CONTINUE; } static VALUE rb_enum_tally_up(VALUE hash, VALUE group) { - rb_hash_stlike_update(hash, group, tally_up, 0); return hash; } |