[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash-3.1.1 parses arrays slightly incorrectly
From: |
Chet Ramey |
Subject: |
Re: bash-3.1.1 parses arrays slightly incorrectly |
Date: |
Sat, 24 Dec 2005 13:27:55 -0500 |
User-agent: |
Thunderbird 1.5 (Macintosh/20051201) |
Mike Frysinger wrote:
> On Thu, Dec 22, 2005 at 09:24:06AM -0500, Chet Ramey wrote:
>> Bash-Release: 3.1
>> Patch-ID: bash31-001
>>
>> Bug-Description:
>>
>> There are parsing problems with compound assignments in several contexts,
>> including as arguments to builtins like `local', `eval', and `let', and
>> as multiple assignments in a single command.
>
> still seems to be a slight regression here with arrays ...
Try this:
*** ../bash-3.1/subst.c Mon Oct 24 09:51:13 2005
--- subst.c Fri Dec 23 15:21:09 2005
***************
*** 2188,2192 ****
{
v = find_variable (name);
! if (v == 0 || array_p (v) == 0)
v = make_local_array_variable (name);
v = assign_array_var_from_string (v, value, flags);
--- 2188,2192 ----
{
v = find_variable (name);
! if (v == 0 || array_p (v) == 0 || v->context != variable_context)
v = make_local_array_variable (name);
v = assign_array_var_from_string (v, value, flags);
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live Strong.
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/