Hi folks,

It would be nice if Dir implemented a method "in_directory", implemented
as follows:

  # Change to directory dir, execute the block, then change back.
  def in_directory (dir)
    old_dir = Dir.getwd
    begin
      Dir.chdir dir
      yield
    ensure
      Dir.chdir old_dir
    end
  end

is there any change of getting something like this into the core?
Other names might be "with_chdir" or "using_dir" or something like
that.

--J

-- 
Johann Hibschman                           johann / physics.berkeley.edu