aboutsummaryrefslogtreecommitdiffstats
path: root/array.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-08-12 09:46:59 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-08-13 10:14:20 +0900
commit1f9e25cd027ea05311ca25aa9fc09cf935cb5040 (patch)
treeee653230723514d7fd83c2dfe2632140a3911537 /array.c
parent4fc6cfbeae3c86e8f3675c70b417356ecd3d4a56 (diff)
downloadruby-1f9e25cd027ea05311ca25aa9fc09cf935cb5040.tar.gz
MAYBE_UNUSED should just suffice
This reverts commit c355fa72d4e356378a8b03a67432b52bafcc308b.
Diffstat (limited to 'array.c')
-rw-r--r--array.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/array.c b/array.c
index ebdbc9caed..a07757f210 100644
--- a/array.c
+++ b/array.c
@@ -46,12 +46,14 @@ VALUE rb_cArray;
#define ARY_MAX_SIZE (LONG_MAX / (int)sizeof(VALUE))
#define SMALL_ARRAY_LEN 16
+RBIMPL_ATTR_MAYBE_UNUSED()
static int
should_be_T_ARRAY(VALUE ary)
{
return RB_TYPE_P(ary, T_ARRAY);
}
+RBIMPL_ATTR_MAYBE_UNUSED()
static int
should_not_be_shared_and_embedded(VALUE ary)
{
@@ -9100,11 +9102,6 @@ rb_ary_deconstruct(VALUE ary)
void
Init_Array(void)
{
- if (should_be_T_ARRAY(Qnil)) {
- should_not_be_shared_and_embedded(Qnil);
- UNREACHABLE;
- }
-
#undef rb_intern
#define rb_intern(str) rb_intern_const(str)