visionmedia-commander 3.2.8 → 3.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.rdoc +4 -0
- data/commander.gemspec +1 -1
- data/lib/commander/runner.rb +2 -1
- data/lib/commander/version.rb +1 -1
- metadata +1 -1
data/History.rdoc
CHANGED
data/commander.gemspec
CHANGED
data/lib/commander/runner.rb
CHANGED
|
@@ -281,7 +281,8 @@ module Commander
|
|
|
281
281
|
switches = option[:switches]
|
|
282
282
|
past_switch, arg_removed = false, false
|
|
283
283
|
@args.delete_if do |arg|
|
|
284
|
-
|
|
284
|
+
# TODO: clean this up, no rescuing ;)
|
|
285
|
+
if switches.any? { |switch| switch.match(/^#{arg}/) rescue false }
|
|
285
286
|
past_switch, arg_removed = true, false
|
|
286
287
|
true
|
|
287
288
|
elsif past_switch && !arg_removed && arg !~ /^-/
|
data/lib/commander/version.rb
CHANGED