Never use flags on T_NODE

Previously, any time we used FL_TEST or variations we would need to add
an additional test that it wasn't a T_NODE. I think that was only needed
historically and we can avoid generating that extra code.
This commit is contained in:
John Hawthorn 2025-06-24 15:15:02 -07:00
parent 3c66eb3358
commit 6b7f56d2db

View file

@ -442,10 +442,8 @@ RB_FL_ABLE(VALUE obj)
if (RB_SPECIAL_CONST_P(obj)) {
return false;
}
else if (RB_TYPE_P(obj, RUBY_T_NODE)) {
return false;
}
else {
RBIMPL_ASSERT_OR_ASSUME(!RB_TYPE_P(obj, RUBY_T_NODE));
return true;
}
}