From: Brian Candler Date: 2008-09-30T03:53:15+09:00 Subject: Re: Ara Howard wrote: > On Sep 27, 2008, at 7:20 PM, Max Dev wrote: > >> Then, I want the working directory to be changed (in terminal) by the >> Ruby program after it exits. > > > > cfp:~ > cat a.rb > Dir.chdir '/tmp' > exec 'bash' > > > cfp:~ > ruby a.rb > > > cfp:/private/tmp > pwd > /private/tmp Sneaky. That's not the original shell; type "exit" and you get back to the original shell, with its original working directory. And if you keep doing this, you'll eat up more and more process slots and RAM. But maybe it's sufficient for the OP. -- Posted via http://www.ruby-forum.com/.