summaryrefslogtreecommitdiff
path: root/lualibs-io.lua
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-05-21 06:22:29 +0300
committerKhaled Hosny <khaledhosny@eglug.org>2010-05-21 06:22:29 +0300
commit5f2ef13d20837eb9c0fe84a378e70c5066e6d021 (patch)
tree8da8eb76198b5015119d88aeb0480dedefa27e1d /lualibs-io.lua
parent2ede45796e70760267e4928dfff04d3546a8f159 (diff)
downloadlualibs-5f2ef13d20837eb9c0fe84a378e70c5066e6d021.tar.gz
Sync with ConTeXt beta (beta 2010.05.20)
Needed to sync luaotfload.
Diffstat (limited to 'lualibs-io.lua')
-rw-r--r--lualibs-io.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/lualibs-io.lua b/lualibs-io.lua
index 5a126da..66e2793 100644
--- a/lualibs-io.lua
+++ b/lualibs-io.lua
@@ -170,13 +170,14 @@ function io.ask(question,default,options)
elseif not options then
return answer
else
- for _,v in pairs(options) do
- if v == answer then
+ for k=1,#options do
+ if options[k] == answer then
return answer
end
end
local pattern = "^" .. answer
- for _,v in pairs(options) do
+ for k=1,#options do
+ local v = options[k]
if find(v,pattern) then
return v
end