summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/common
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2012-12-29 17:42:25 +0100
committerspag <spag@golwen.net>2012-12-29 17:42:25 +0100
commit929e7a391f139ed827e9bd3bea339789a82de6d4 (patch)
tree884b8e3b0f5b8b2b5f65788acaefe921256742c1 /misc/freeswitch/scripts/common
parent8dad9594fbcc8c236a350266c4538a92eeae2772 (diff)
support for numeric keys added
Diffstat (limited to 'misc/freeswitch/scripts/common')
-rw-r--r--misc/freeswitch/scripts/common/str.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/misc/freeswitch/scripts/common/str.lua b/misc/freeswitch/scripts/common/str.lua
index b19f299..ca6dcd9 100644
--- a/misc/freeswitch/scripts/common/str.lua
+++ b/misc/freeswitch/scripts/common/str.lua
@@ -7,6 +7,7 @@ module(...,package.seeall)
function try(array, arguments)
local argument = arguments:match('^(.-)%.') or arguments;
local remaining_arguments = arguments:match('%.(.-)$');
+ argument = tonumber(argument) or argument;
if argument and type(array) == 'table' then
if remaining_arguments then