convert check for array length to assertion and comment out

In regparse.c, in function node_extended_grapheme_cluster,
we used a raw if() with exit(1) as a cross-check for our
length calculations for the common node array. Convert this
to an assertion and comment it out because it is not needed
for active code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
duerst 2018-12-07 07:20:26 +00:00
Родитель cc9b57a2b4
Коммит 9bb2da28d5
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -5937,7 +5937,7 @@ node_extended_grapheme_cluster(Node** np, ScanEnv* env)
/* (Extend* ZWJ \p{Extended_Pictographic})* */
{
Node **Ex_list = XP_list + 2; /* size: 4 */
if (!(Ex_list+4 == node_common+NODE_COMMON_SIZE)) exit(1);
/* assert(Ex_list+4 == node_common+NODE_COMMON_SIZE); */
R_ERR(quantify_property_node(Ex_list+0, env, "Grapheme_Cluster_Break=Extend", '*'));
/* ZWJ (ZERO WIDTH JOINER) */