From: Dale Martenson Date: 2006-06-20T05:04:50+09:00 Subject: Re: How to do this debugging? Philip Rhoades wrote: > People, > > I usually pipe my data file through my ruby script with: > > cat parsefile | t1.rb > > but some obscure problems have been tricky to find - if I use: > > ruby -r debug t1.rb > > - how do I pipe the parsefile in ? > If you redefine $stdin, you can get this to work. Enter the debugger with: ruby -r debug t1.rb Now redefine $stdin as: $stdin = IO.popen("cat parsefile") You can now start debugging. All input will be read from the result of the IO.popen call. --Dale Martenson -- Posted via http://www.ruby-forum.com/.