Table length evaluations --> Lua 5.5 vs. Lua 5.4

"'Kritzel Kratzel' via lua-l" <[email protected]>
Newsgroups gmane.comp.lang.lua.general
Message-ID <[email protected]>
While porting lua-cjson to Lua 5.5, I encountered a test case failure. It 
appears that Lua 5.5 handles table length evaluation differently than 
previous versions, especially regarding tables with holes:

[C:\...\tests]> lua -e "print(_VERSION); t={nil,true}; print(#t)"
Lua 5.5
0

[C:\...\tests]> C:\Apps\OneLuaPro-5.4.8.3-x64\bin\lua.exe -e 
"print(_VERSION); t={nil,true}; print(#t)"
Lua 5.4
2

Bug or feature?

Regards,
KK

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/a261007a-f664-46ee-a2fe-df201da572d8n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.