Commit Graph
3 Commits
Author SHA1 Message Date
Zef Hemel 8592b3add6 Lua snake_case -> camelCase naming in tests 2026-02-12 17:32:28 +01:00
Matouš Jan FialkaandGitHub b363bd7e59 Fix serious truthiness evaluation flaws. (#1644)
In Lua, only the last expression in an argument list preserves multiple
results and all earlier expressions yield exactly one value (their first).

For example:

```
f(a(), b(), c())
```

where

```
a -> (1,2)
b -> (3,4)
c -> (5,6)
```

becomes

```
f(1, 3, 5, 6)
```

which matches Lua behaviour (tested in version 5.4).

Changes:

* Function argument lists keep multiple results only from the last
  argument.

* Fixes failing truthiness tests (`true and ret_one_two()`).

Sidenote: the `truthiness_test.lua` was not called at all because of
my obvious copy/paste typo (the `arithmetical_test.lua` was called twice
instead; now fixed too and both test suites pass ok).
2025-10-20 17:34:45 +02:00
Matouš Jan FialkaandGitHub 0856e3fda2 Space Lua: Fix truthiness semantic deviation (#1630)
* Space Lua: Fix truthiness semantic deviation

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
2025-10-15 09:15:44 +02:00