]> git.e2factory.org Git - e2factory.git/commit
environment: bugfix for set() and iter()
authorTobias Ulmer <tu@emlix.com>
Wed, 26 Jun 2019 15:51:44 +0000 (17:51 +0200)
committerTobias Ulmer <tu@emlix.com>
Wed, 26 Jun 2019 17:47:07 +0000 (19:47 +0200)
commit0c8ee616823ebcafd3db440932182217badd2101
tree4eee4050712ee720dba5937740409b371af8292c
parent7d1dfce4d29ae5223b446f4bd1d6e388fad917b6
environment: bugfix for set() and iter()

Both problems behaved in a deterministic way and didn't produce
problematic EnvID changes

set() failed on duplicate vars, inserting the same var more than once
into the sorted table

iter() was using next(), which is not guaranteed to follow the table
in numerical order

Unit tests have been added for this issue.

Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/environment.lua