From: "Peña, Botp" Date: 2005-04-08T17:11:35+09:00 Subject: Re: optparse to include no opt-args, invalid opt,... nobu.nokada@softhome.net [mailto:nobu.nokada@softhome.net] wrote: #Pe�a, Botp wrote in [ruby-talk:136878]: #> 1. Can optparse capture nil/empty args? #> 2. Can optparse capture a simple arg? #> 3. Can optparse capture errors like invalid options or invalid #> arguments? # #No for all, if I get what you mean by "in optparse structure", #correctly. I guess you're thinking of the case of "capturing #in separated files/classes" for instance, no? # #Maybe worthful. Let me consider for a while. Hi Nobu, thank you for considering. In the meantime how do a capture cleanly a simple arg. I can capture invalid options/args thru error rescue, but a simple non-option arg does not fire an exception. eg. >opsample.rb iwanttocatchthisone or >opsample.rb -r okoption iwanttocatchthisone I'm just asking for any rubyway tip on how to capture it (iwanttocatchthisone) -other than parsing manually the whole args line. thanks and kind regards -botp # #-- #Nobu Nakada #