Re: bug adding K,V pairs to existing hash with HASH+=([K]=V)
From:
Chet Ramey
Subject:
Re: bug adding K,V pairs to existing hash with HASH+=([K]=V)
Date:
Mon, 15 Feb 2016 16:17:34 -0500
User-agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.1
On 2/15/16 3:48 PM, Linda Walsh wrote:
>
>
> Chet Ramey wrote:
>> On 2/15/16 12:35 PM, Linda Walsh wrote:
>>
>>
>>> Bash Version: 4.3
>>> Patch Level: 42
>>> Release Status: release
>>>
>>> Description:
>>> [Detailed description of the problem, suggestion, or complaint.]
>>>
>>> When I create hash and later add keys using the form
>>> "HASH+=([key]=VALUE)", if KEY already existed in the HASH, then
>>> I get the += applied to the VALUE as well
>>> (strings get appended, ints get added).
>>>
>>> Whether '+=' or '=' is used in the VALUE assignment, the
>>> effect is '+='.
>>>
>>
>> http://lists.gnu.org/archive/html/bug-bash/2014-11/msg00169.html
>> http://lists.gnu.org/archive/html/bug-bash/2014-11/msg00179.html
>>
> ----
> Right... and?
>
> Did it never make it in to 4.3?
It will be in bash-4.4.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/