summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hawthorn <[email protected]>2025-06-24 15:15:02 -0700
committerJohn Hawthorn <[email protected]>2025-06-25 15:58:53 -0700
commit6b7f56d2db292eb6d5d8dd21906e5d51cbbc9187 (patch)
tree26f87931f6a0b234ba6c69f802061d4c750e2df7
parent3c66eb335831df4df7b1bba4514af70b17c97ebc (diff)
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.
-rw-r--r--include/ruby/internal/fl_type.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/ruby/internal/fl_type.h b/include/ruby/internal/fl_type.h
index e52ccecedd..9e1f3dd15c 100644
--- a/include/ruby/internal/fl_type.h
+++ b/include/ruby/internal/fl_type.h
@@ -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;
}
}