From: Heng Li Date: Thu, 7 Apr 2011 02:39:57 +0000 (-0400) Subject: fixed a bug in example X-Git-Tag: ksprintf-final~56 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=cf855128a60d205e535bded2ea7cea48cff53a3b;p=klib.git fixed a bug in example --- 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