lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

After all that discussion about testing for NaN I am afraid we do
not need that test after all :)

That test was present to prevent a problem when inserting NaN as a
key. Because of small changes in the way new keys are inserted (in 5.1,
space is alocated before the insertion), it seems that there is no
problem in inserting NaN as a key into a table (except that the key is
never found again :). Well, there are other "problems", for instance
a traversal of a table with NaN will also fail, again because
it will not be able to find that key to continue the traversal.
But that does not "break" Lua, it is only a strange behavior for a
strange situation.

It still needs some more tests, but I guess we can simply remove the
tests for Nan.

-- Roberto