Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix definition of os.exit() in Lua 5.2+ #540

Merged
merged 1 commit into from
Aug 27, 2023
Merged

Conversation

Zash
Copy link
Contributor

@Zash Zash commented Jul 23, 2023

In Lua 5.2, os.exit() gained an additional boolean argument. This updates the stdlib description file to reflect this, which should also affect Lua 5.3 (and 5.4, but this does not appear to exist at this time).

Copy link
Owner

@Kampfkarren Kampfkarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Make sure to update the CHANGELOG as well

@Kampfkarren Kampfkarren linked an issue Jul 23, 2023 that may be closed by this pull request
@Zash
Copy link
Contributor Author

Zash commented Jul 25, 2023

Added a line in the changelog

@Kampfkarren Kampfkarren enabled auto-merge (squash) July 26, 2023 00:09
Fixes Kampfkarren#538

In Lua 5.2, os.exit() gained an additional boolean argument.
auto-merge was automatically disabled July 31, 2023 05:58

Head branch was pushed to by a user without write access

@Zash
Copy link
Contributor Author

Zash commented Jul 31, 2023

One of the checks looked to have gotten stuck on something hopefully unrelated to this change, force-pushed in the hopes of a re-run.

@Kampfkarren
Copy link
Owner

Sorry for delay, I have been busy

@Kampfkarren Kampfkarren enabled auto-merge (squash) August 27, 2023 07:02
@Kampfkarren Kampfkarren merged commit 8a80415 into Kampfkarren:main Aug 27, 2023
10 of 11 checks passed
@Zash Zash deleted the issue538 branch August 27, 2023 09:56
@Zash
Copy link
Contributor Author

Zash commented Aug 27, 2023

No worries! Thanks!

@13k
Copy link

13k commented Aug 28, 2023

Late to the party, but os.exit also accepts boolean for code parameter:

If code is true, the returned status is EXIT_SUCCESS; if code is false, the returned status is EXIT_FAILURE; if code is a number, the returned status is this number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect definition of os.exit in Lua 5.2
3 participants