dannypurcell / rubycom

Turn your library into a command-line app by simply including Rubycom.
http://dannypurcell.github.io/rubycom/
MIT License
5 stars 0 forks source link

Option parsing breaks on arrays when used in tagged option #10

Closed dannypurcell closed 11 years ago

dannypurcell commented 11 years ago

The following options get sent to the method as separate arguments

-opt='[arg1,arg2]'

-opt='["arg1","arg2"]'

-opt=[arg1,arg2]

dannypurcell commented 11 years ago

Verified working as intended. This turned out to be an issue in the consuming application. The option in question was ordered in front of a required parameter. Ruby will allow this scenario but will always fill the required parameter if it can. In this case that meant placing arg1 in the optional parameter and arg2 in the required parameter.