From 9bb2da28d56e472b7ec156bf1779cf3d974737f7 Mon Sep 17 00:00:00 2001 From: duerst Date: Fri, 7 Dec 2018 07:20:26 +0000 Subject: 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 --- regparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'regparse.c') diff --git a/regparse.c b/regparse.c index e8af6f3f99..5e51e39502 100644 --- a/regparse.c +++ b/regparse.c @@ -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) */ -- cgit v1.2.3