]> git.kaiwu.me - klib.git/commitdiff
fixed a bug in example
authorHeng Li <lh3@live.co.uk>
Thu, 7 Apr 2011 02:39:57 +0000 (22:39 -0400)
committerHeng Li <lh3@live.co.uk>
Thu, 7 Apr 2011 02:39:57 +0000 (22:39 -0400)
lua/klib.lua

index fc26b40495fb8617ad41a776b9fbc22aa8c3030a..e404c12a170f72d616ebc11ee57e79220282f53a 100644 (file)
@@ -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