diff --git a/releasenotes.md b/releasenotes.md index 71f7eb8..08a1fac 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -2,6 +2,18 @@ +## V2.03.12 (2020-07-23) + +### Additions + +### Removals + +### Changes + +### Fixes +- string.split bugfix (issue #49) + + ## V2.03.11 (2020-07-21) ### Additions diff --git a/safer_lua/environ.lua b/safer_lua/environ.lua index 4a0fb51..a753ff5 100644 --- a/safer_lua/environ.lua +++ b/safer_lua/environ.lua @@ -57,7 +57,9 @@ local BASE_ENV = { rep = string.rep, sub = string.sub, upper = string.upper, - split = string.split, + split = function(str, separator, include_empty, max_splits, sep_is_pattern) + return safer_lua.Array(unpack(string.split(str, separator, include_empty, max_splits, sep_is_pattern))) + end, trim = string.trim, }, tonumber = tonumber,