Hi folks,

I don't know if this functionality is included somewhere else and I just 
missed it, but it sure is handy to have Dir be able to push and pop 
directories as well as just chdir. I often use something like this:

class Dir
  class << self
    @@dirlist = []
    
    def pushd(dir)
      @@dirlist.unshift(Dir.pwd)
      Dir.chdir(dir)
      return @@dirlist
    end
    
    def popd(dir)
      unless @@dirlist.empty?
	Dir.chdir(@@dirlist.shift)
      end
      return @@dirlist
    end
  end
end


Seems like these are basic and useful enough to be a good candidates for 
adding to the main ruby Dir class. Or at least, something that might go 
well in ftools.

What do you think of the idea? Of the implementation? Matz? =)

-- 
Wesley J. Landaker - wjl / icecavern.net
OpenPGP FP: C99E DF40 54F6 B625 FD48  B509 A3DE 8D79 541F F830