Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -O2
uname output: Linux digraph 2.6.16.14 #1 SMP PREEMPT Fri May 5 00:45:34 UTC
2006 i686 unknown unknown GNU/Linux
Machine Type: i686-pc-linux-gnu
Bash Version: 3.1
Patch Level: 17
Release Status: release
Description:
When a local array variable is initialized in the "local" command
using the outer variable of the same name, the list of elements is not
processed correctly.
Repeat-By:
Consider the code:
f() {
echo "[EMAIL PROTECTED]"
local -a a=("[EMAIL PROTECTED]")
echo "[EMAIL PROTECTED]"
}
a=("a" "b c" "d")
echo "[EMAIL PROTECTED]"
f
It initializes a local array from the outer array of that name. It
should display:
3
3
3
However, with bash 3.1 patch 17 it displays:
3
3
0
(and with bash 3.0 patch 16 it displays:
3
3
4
)
_______________________________________________
Bug-bash mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-bash