diff options
author | 卜部昌平 <[email protected]> | 2020-08-17 11:12:23 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2020-08-19 15:10:53 +0900 |
commit | 99093e1600ccef17ab99356b689573fcfd336ecc (patch) | |
tree | b0654845b92b038889fff4eab6e1c73b6ba8a4c0 /ext/objspace/objspace.c | |
parent | d2eeb836344406eff3342b86436cc7eb0f8cc908 (diff) |
RHASH_TBL: is now ext-only
It seems almost no internal codes use RHASH_TBL any longer. Why not
just eliminate it entirely, so that the macro can be purely ext-only.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3426
Diffstat (limited to 'ext/objspace/objspace.c')
-rw-r--r-- | ext/objspace/objspace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c index a9b1e64183..262640d30c 100644 --- a/ext/objspace/objspace.c +++ b/ext/objspace/objspace.c @@ -141,7 +141,8 @@ setup_hash(int argc, VALUE *argv) hash = rb_hash_new(); } else if (!RHASH_EMPTY_P(hash)) { - st_foreach(RHASH_TBL(hash), set_zero_i, hash); + /* WB: no new reference */ + st_foreach(RHASH_TBL_RAW(hash), set_zero_i, hash); } return hash; |