diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2023-08-24 15:19:33 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-24 15:19:33 +1200 |
commit | d4c720a91bc7bb9ff31810e1720acffb939f7a2f (patch) | |
tree | 164045fc674af9c849d76ab446cfd3caece7fee3 /cont.c | |
parent | bd22bb259c183b91656bea72899fe91c31aeb44e (diff) |
Fix support for dynamic keys. (#8273)
* Skip RBS test.
Notes
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
Diffstat (limited to 'cont.c')
-rw-r--r-- | cont.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -2118,7 +2118,7 @@ rb_fiber_storage_get(VALUE self) static int fiber_storage_validate_each(VALUE key, VALUE value, VALUE _argument) { - rb_check_id(&key); + Check_Type(key, T_SYMBOL); return ST_CONTINUE; } @@ -2190,8 +2190,7 @@ rb_fiber_storage_set(VALUE self, VALUE value) static VALUE rb_fiber_storage_aref(VALUE class, VALUE key) { - ID id = rb_check_id(&key); - if (!id) return Qnil; + Check_Type(key, T_SYMBOL); VALUE storage = fiber_storage_get(fiber_current(), FALSE); if (storage == Qnil) return Qnil; @@ -2212,8 +2211,7 @@ rb_fiber_storage_aref(VALUE class, VALUE key) static VALUE rb_fiber_storage_aset(VALUE class, VALUE key, VALUE value) { - ID id = rb_check_id(&key); - if (!id) return Qnil; + Check_Type(key, T_SYMBOL); VALUE storage = fiber_storage_get(fiber_current(), value != Qnil); if (storage == Qnil) return Qnil; |