-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
I would expect the std.string.monkey_patch() function to muck with the default string functions. I hate it, but I expect it.
I just bumped into a project where removing the monkey patch and using std.string() for all function calls that expect the relevant stdlib patched behavior still works completely differently (and crashes).
It turns out running the monkey patch function also changes other core Lua functions including reversing the default output of pairs().
Lines 333 to 335 in a632078
| --- An iterator like ipairs, but in reverse. | |
| -- Apart from the order of the elements returned, this function follows | |
| -- the same rules as @{ipairs} for determining first and last elements. |
This is needs to stop. Explicitly patching functions when asked is one thing, patching other things in a different scope as a side effect is not.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels