From 929e7a391f139ed827e9bd3bea339789a82de6d4 Mon Sep 17 00:00:00 2001 From: spag Date: Sat, 29 Dec 2012 17:42:25 +0100 Subject: support for numeric keys added --- misc/freeswitch/scripts/common/str.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'misc/freeswitch/scripts/common/str.lua') 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 -- cgit v1.2.3