summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2023-08-24 15:19:33 +1200
committerGitHub <noreply@github.com>2023-08-24 15:19:33 +1200
commitd4c720a91bc7bb9ff31810e1720acffb939f7a2f (patch)
tree164045fc674af9c849d76ab446cfd3caece7fee3 /cont.c
parentbd22bb259c183b91656bea72899fe91c31aeb44e (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.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/cont.c b/cont.c
index ac3d77f940..db8508e724 100644
--- a/cont.c
+++ b/cont.c
@@ -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;