From bdb2f0003ea2cb62c4e043694eab5c7392eaa108 Mon Sep 17 00:00:00 2001 From: rxi Date: Mon, 3 Mar 2014 22:10:58 +0000 Subject: [PATCH] Made lume.dostring() use load() if no loadstring() lume.dostring() now checks if the loadstring() function (deprecated in lua5.2) exists, and uses load() if it does not. --- lume.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lume.lua b/lume.lua index b55a487..d26ec7b 100644 --- a/lume.lua +++ b/lume.lua @@ -245,7 +245,7 @@ end function lume.dostring(str) - return assert(loadstring(str))() + return assert((loadstring or load)(str))() end