mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 02:12:42 -04:00
Performance hack until I can properly address the speed issues in the Lua implementation of Lua's pattern matching. Should fix #648 for now.
This commit is contained in:
parent
7faa309388
commit
041300fde7
@ -577,7 +577,7 @@ do
|
||||
checkArg(3, repl, "number", "string", "function", "table")
|
||||
checkArg(4, n, "number", "nil")
|
||||
|
||||
if #s < SHORT_STRING then
|
||||
if #s < SHORT_STRING or type(repl) == "function" then
|
||||
return string_gsub(s, pattern, repl, n)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user