Collectgarbage incorrectly listed as deprecated

The script editor emits a warning when using collectgarbage, stating that it’s deprecated and to use gcinfo instead.
image
However, the Lua 5.1 manual states the opposite

Function collectgarbage has different arguments. Function gcinfo is deprecated; use collectgarbage("count") instead.

It would be odd to undeprecate the deprecated function and deprecate the non-deprecated function, so this seems like a bug.

I just noticed this today (version 0.451.0.412446), but I’m not sure how long it’s been a problem.

I’m pretty sure this is intentional, see:

image

(Sandboxing - Luau)

I understand the confusion (I had the same exact doubts a couple weeks ago) but the Luau blog should resolve any concerns.

4 Likes

I see, but that doesn’t state that gcinfo was undeprecated, so are both deprecated?

gcinfo was never deprecated on Roblox AFAIK

1 Like

I presume that since the manual stated that it’s deprecated, it would be deprecated on Roblox too. (like how table.setn was deprecated and removed in Roblox)

1 Like