From: Markus Prinz Date: 2006-07-11T19:52:47+09:00 Subject: Re: Is possible to return after exec cmd? Petr Spisek wrote: > Hi folks, > why doesn't work command 5.times{exec "pwd"} like this 5.times{puts > "Hello"} ? Because 'exec' overwrites the current Ruby process, so when 'pwd' finishes there's nothing left to run. What you are looking for is 'system("pwd")' or "`pwd`". Greets, Markus