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