>>>>> "M" == Mathieu Bouchard <matju / sympatico.ca> writes:

>> Dir.chdir(new_dir) {
>> # work in new_dir...
>> }

M> Sounds good to me. If File.open can, why not this one.

 What do you do with thread ?

  a = Thread.new {
      Dir.chdir(newdir) {
         Thread.pass
      }
  }

  b = Thread.new {
      Dir.chdir(dir) {
         # what is the current directory
         Thread.pass
      }
  }

  a.join
  b.join

  

Guy Decoux