From: wkm Date: 2009-11-11T11:17:17+09:00 Subject: Re: Is it a bug?exec "cd" 'cd' isn't actually a program. (typically; OS X seems to have it setup as a super obscure shell script) Note: > [wkm@zanoccio ~]$ which cd > /usr/bin/which: no cd in (/usr/kerberos/bin://bin:/usr/local/bin:/bin:/usr/bin:/home/wiktor/bin) It's one of the interpreted commands of the shell you're using. >---- Original Message ---- >From: Haoqi Haoqi >To: ruby-talk@ruby-lang.org (ruby-talk ML) >Sent: Tue, Nov 10, 2009, 19:52 PM >Subject: Is it a bug?exec "cd" > >$ cat into.rb >exec "cd /tmp" >$ ruby into.rb >into.rb:1:in `exec': No such file or directory - cd /tmp (Errno::ENOENT) > from into.rb:1 >--------------------- >exec "cd anything" as the same result error.how to exec "cd"?thanks >-- >Posted via http://www.ruby-forum.com/.