Class: Dir

Inherits:
Object
  • Object
show all
Defined in:
lib/fsdb/compat.rb

Class Method Summary collapse

Class Method Details

.chdir(*args) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/fsdb/compat.rb', line 28

def chdir(*args)
  if block_given?
    begin
      old_dir = Dir.pwd
      old_chdir(*args)
      yield
    ensure
      old_chdir(old_dir)
    end
  else
    old_chdir(*args)
  end
end

.old_chdirObject



27
# File 'lib/fsdb/compat.rb', line 27

alias old_chdir chdir