From cf855128a60d205e535bded2ea7cea48cff53a3b Mon Sep 17 00:00:00 2001 From: Heng Li Date: Wed, 6 Apr 2011 22:39:57 -0400 Subject: [PATCH] fixed a bug in example --- lua/klib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/klib.lua b/lua/klib.lua index fc26b40..e404c12 100644 --- a/lua/klib.lua +++ b/lua/klib.lua @@ -59,7 +59,7 @@ -- Description: getopt() translated from the BSD getopt(); compatible with the default Unix getopt() --[[ Example: - for opt, optarg = os.getopt(arg, 'a:b') do + for opt, optarg in os.getopt(arg, 'a:b') do if opt == 'a' then print(opt .. '=' .. optarg) elseif opt == 'b' then print(opt) end -- optarg is nil end -- 2.47.3