diff options
Diffstat (limited to 'internal/array.h')
-rw-r--r-- | internal/array.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/array.h b/internal/array.h index 2e53d43c7d..c9f2b47145 100644 --- a/internal/array.h +++ b/internal/array.h @@ -100,4 +100,15 @@ RARY_TRANSIENT_UNSET(VALUE ary) }) #endif +#undef RARRAY_AREF +RBIMPL_ATTR_PURE_UNLESS_DEBUG() +RBIMPL_ATTR_ARTIFICIAL() +static inline VALUE +RARRAY_AREF(VALUE ary, long i) +{ + RBIMPL_ASSERT_TYPE(ary, RUBY_T_ARRAY); + + return RARRAY_CONST_PTR_TRANSIENT(ary)[i]; +} + #endif /* INTERNAL_ARRAY_H */ |