Use rb_bug instead of UNREACHABLE for assertions
UNREACHABLE uses __builtin_unreachable which is not intended to be used as an assertion.
This commit is contained in:
parent
c51d8ff458
commit
e956ce32c8
Notes:
git
2024-09-24 18:55:13 +00:00
8
string.c
8
string.c
@ -3763,9 +3763,7 @@ rb_str_append_as_bytes(int argc, VALUE *argv, VALUE str)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
UNREACHABLE;
|
||||
RUBY_ASSERT("append_as_bytes arguments should have been validated");
|
||||
break;
|
||||
rb_bug("append_as_bytes arguments should have been validated");
|
||||
}
|
||||
}
|
||||
|
||||
@ -3793,9 +3791,7 @@ rb_str_append_as_bytes(int argc, VALUE *argv, VALUE str)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
UNREACHABLE;
|
||||
RUBY_ASSERT("append_as_bytes arguments should have been validated");
|
||||
break;
|
||||
rb_bug("append_as_bytes arguments should have been validated");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user