# Re: GetoptLong Accessing the values with out looping

**URL:** <https://www.ruby-forum.com/t/re-getoptlong-accessing-the-values-with-out-looping/94852>\
**Category:** Ruby\
**Created:** [May 16, 2006, 5:43pm UTC](https://www.ruby-forum.com/t/re-getoptlong-accessing-the-values-with-out-looping/94852 "2006-05-16T17:43:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [May 16, 2006, 5:43pm UTC](https://www.ruby-forum.com/t/re-getoptlong-accessing-the-values-with-out-looping/94852/1 "2006-05-16T17:43:29Z")

</div>

> > directly  
> > as a workaround.
> > 
> > May I ask when you would want to parse an arbitrary array? I’m  
> > curious.
> 
> Easier to write unit tests for, maybe.

I just push arguments onto ARGV directly for that. In fact, it’s what I  
do for the unit tests for getopt. 🙂

Dan

This communication is the property of Qwest and may contain confidential  
or  
privileged information. Unauthorized use of this communication is  
strictly  
prohibited and may be unlawful. If you have received this communication  
in error, please immediately notify the sender by reply e-mail and  
destroy  
all copies of the communication and any attachments.
