Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: 3.1.4: Re: zsh bug with local variables?



On Aug 18,  4:51pm, Peter Stephenson wrote:
} Subject: PATCH: 3.1.4: Re: zsh bug with local variables?
}
} !     /* If this was a local variable, we need to keep the old     *
} !      * struct so that it is resurrected at the right level.      *
} !      * This is partly because when an array/scalar value is set	 *
} !      * and the parameter used to be the other sort, unsetparam() *
} !      * is called.  Beyond that, there is an ambiguity:  should	 *
} !      * foo() { local bar; unset bar; } make the global  bar	 *
} !      * available or not?  The following makes the answer "no".   */

That's consistent with the 3.0.5 behavior.  Remember my namedir tests?
With this patch applied, 3.1.4 behaves exactly like 3.0.5 again:

zagzig% namedir_test
zsh 3.1.4
TEST 1
namedir1: test1=/etc
namedir1: test1=/etc
namedir2: test1=/etc
namedir1: test1=/etc
namedir3:
namedir1: test1=/etc
namedir4:
TEST 2
namedir1: test2=/etc
namedir1: test2=/etc
namedir2: test2=/etc
namedir1: test2=/etc
namedir3:
namedir1: test2=/etc
namedir4: test2=/usr/bin

(I still think the namedir4 behavior is wrong.)

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author