Menu

#39 table.remove return inconsistent

v3.0-beta1
closed-fixed
nobody
None
5
2015-04-30
2014-10-09
Vlad Fedin
No

table.remove return on empty table inconsistent with canonical lua 5.2 behaviour

Lua 5.2.2  Copyright (C) 1994-2013 Lua.org, PUC-Rio
> local k = table.remove({ }) print(k == nil)
true

java -cp lib/luaj-jse-3.0.jar lua -v
Luaj-jse 3.0 Copyright (c) 2012 Luaj.org.org
java -cp lib/luaj-jse-3.0.jar lua
> local k = table.remove({ }) print(k == nil)
false

Discussion

  • James Roseborough

    Have added a fix for this in 3.0.1

     
  • James Roseborough

    • status: open --> pending-fixed
     
  • Vlad Fedin

    Vlad Fedin - 2015-03-16

    Can't see 3.0.1 in https://sourceforge.net/projects/luaj/files/. Can you please suggest where can I download it?

     
  • James Roseborough

    Is fixed in version 3.0.1.

     
  • James Roseborough

    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.