cc:  [email protected]    [email protected]
Subject: Re: Re: [ast-users] ksh93 returns "()" for "${a[@]}" if I clear an 
array  with a=( )
--------

Here is the patch:

--- old/sh/name.c       Mon Jun 24 15:37:10 2013
+++ new/sh/name.c       Thu Jul 11 13:50:50 2013
@@ -455,7 +457,14 @@
                                if(tp->tre.tretyp==0 && !tp->com.comset && 
!tp->com.comarg)
                                {
                                        if(!(arg->argflag&ARG_APPEND) && 
nv_isattr(np,NV_BINARY|NV_NOFREE|NV_RAW)!=(NV_BINARY|NV_NOFREE|NV_RAW))
+                                       {
+                                               array = nv_isarray(np);
                                                _nv_unset(np,NV_EXPORT);
+                                               if(ap && ap->fun)
+                                                       
nv_setarray(np,nv_associative);
+                                               else if(ap || array)
+                                                       nv_onattr(np,NV_ARRAY);
+                                       }
                                        goto skip;
                                }
                                if(tp->tre.tretyp==TLST || !tp->com.comset || 
tp->com.comset->argval[0]!='[')

David Korn
[email protected]
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to