From ef78e3391f8d55cd14c95c98c24e4b6998fc2b77 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 23 Jul 2023 15:47:26 +0200 Subject: [PATCH] Fix definition of os.exit() in Lua 5.2+ Fixes #538 In Lua 5.2, os.exit() gained an additional boolean argument. --- CHANGELOG.md | 1 + selene-lib/default_std/lua52.yml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53f47f66..8a045405 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - `string.pack` and `string.unpack` now have proper function signatures in the Lua 5.3 standard library. - Moved `math.log` second argument addition from Lua 5.3 std lib to 5.2 std lib - `undefined_variable` now correctly errors when defining multiple methods in undefined tables +- Corrected `os.exit` definition in Lua 5.2 standard library ## [0.25.0](https://github.com/Kampfkarren/selene/releases/tag/0.25.0) - 2023-03-12 ### Added diff --git a/selene-lib/default_std/lua52.yml b/selene-lib/default_std/lua52.yml index d247070a..8fae55e8 100644 --- a/selene-lib/default_std/lua52.yml +++ b/selene-lib/default_std/lua52.yml @@ -68,6 +68,12 @@ globals: - type: number - required: false type: number + os.exit: + args: + - required: false + type: number + - required: false + type: bool package.config: property: read-only rawlen: