1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

only compile for T_OBJECT types

This commit is contained in:
Aaron Patterson 2021-09-10 14:25:06 -07:00 committed by Alan Wu
parent 5bc0343261
commit 25f8431d46

View file

@ -3490,7 +3490,7 @@ gen_send_general(jitstate_t *jit, ctx_t *ctx, struct rb_call_data *cd, rb_iseq_t
case VM_METHOD_TYPE_ATTRSET:
GEN_COUNTER_INC(cb, send_ivar_set_method);
if (argc != 1) {
if (argc != 1 || !RB_TYPE_P(comptime_recv, T_OBJECT)) {
return YJIT_CANT_COMPILE;
} else {
ID ivar_name = cme->def->body.attr.id;