mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
eliminate a list with only one element
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4b99725de9
commit
1fa7087f10
1 changed files with 2 additions and 7 deletions
|
@ -6129,15 +6129,10 @@ node_extended_grapheme_cluster(Node** np, ScanEnv* env)
|
|||
/* RI-Sequence := Regional_Indicator{2} */
|
||||
R_ERR(quantify_property_node(&np1, env, "Regional_Indicator", '2'));
|
||||
|
||||
tmp = node_new_list(np1, list2); /* here, list2 should be guaranteed to be NULL */
|
||||
if (IS_NULL(tmp)) goto err;
|
||||
list2 = tmp;
|
||||
np1 = NULL;
|
||||
|
||||
tmp = onig_node_new_alt(list2, alt);
|
||||
tmp = onig_node_new_alt(np1, alt);
|
||||
if (IS_NULL(tmp)) goto err;
|
||||
alt = tmp;
|
||||
list2 = NULL;
|
||||
np1 = NULL;
|
||||
|
||||
tmp = node_new_list(alt, list);
|
||||
if (IS_NULL(tmp)) goto err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue