зеркало из https://github.com/github/ruby.git
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:
Родитель
c51d8ff458
Коммит
e956ce32c8
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче