nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67c1af0
)
lib/opts: `OptionContext::parse` use `args` by default
author
Alexis Laferrière
<alexis.laf@xymus.net>
Fri, 11 Dec 2015 23:24:56 +0000
(18:24 -0500)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Sat, 12 Dec 2015 16:30:58 +0000
(11:30 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/opts.nit
patch
|
blob
|
history
diff --git
a/lib/opts.nit
b/lib/opts.nit
index
3d15652
..
da78780
100644
(file)
--- a/
lib/opts.nit
+++ b/
lib/opts.nit
@@
-309,9
+309,10
@@
class OptionContext
end
end
- # Parse and assign options everywhere in the argument list
- fun parse(argv: Collection[String])
+ # Parse and assign options in `argv` or `args`
+ fun parse(argv: nullable Collection[String])
do
+ if argv == null then argv = args
var it = argv.iterator
parse_intern(it)
end