# Not Passing On Command Line Arguments

**URL:** <https://www.ruby-forum.com/t/not-passing-on-command-line-arguments/172593>\
**Category:** Ruby\
**Created:** [July 23, 2009, 7:22pm UTC](https://www.ruby-forum.com/t/not-passing-on-command-line-arguments/172593 "2009-07-23T19:22:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dylan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e95f7d/32.png) [@Dylan](https://www.ruby-forum.com/u/Dylan)\
**Post date:** [July 23, 2009, 7:22pm UTC](https://www.ruby-forum.com/t/not-passing-on-command-line-arguments/172593/1 "2009-07-23T19:22:37Z")

</div>

Hey there! I have a question about passing command line arguments. I  
have a list of arguments I’d like to use alongside a couple built in  
to Test::Case. However, I keep getting an “invalid argument” error  
every time. Is there a way to handle my command line arguments and  
remove them from the array that gets passed to Test::Case or change  
how Test::Case handles arguments? I’ve tried writing my own  
OptionsParser instance in my code, as well as editing autorunner.rb  
(where OptionsParser is used in Test::Case) and adding my arguments  
there ( o.on(’-c’, ‘–cleanup’, “Clean up stuff”){puts  
“CLEANUPPP!”;exit} ), but even if I try to change the arguments that  
are already there (Changing the help text, for example), nothing seems  
to show up any different. Thanks!

-Dylan

---

<div class="post-metadata">

**Author:** ![Dylan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e95f7d/32.png) [@Dylan](https://www.ruby-forum.com/u/Dylan)\
**Post date:** [July 27, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/not-passing-on-command-line-arguments/172593/2 "2009-07-27T18:35:29Z")

</div>

On Jul 23, 10:12 am, Dylan [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> are already there (Changing the help text, for example), nothing seems  
> to show up any different. Thanks!
> 
> -Dylan

Also, for some reason some arguments I add (by simply adding if  
(ARGV.include? “-cleanup”) ) work fine, but gives an warning:  
Deprecated option (–console). Thanks!

-Dylan
