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:
Florian Nücke 2014-11-03 18:13:35 +01:00
parent 7faa309388
commit 041300fde7

View File

@ -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