Skip to content

Instantly share code, notes, and snippets.

@boblail
Created February 16, 2010 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boblail/305172 to your computer and use it in GitHub Desktop.
Save boblail/305172 to your computer and use it in GitHub Desktop.
class Dir
def Dir.glob_in(path, *args)
original_dir = Dir.pwd
begin
Dir.chdir(path)
return Dir.glob(*args)
ensure
Dir.chdir(original_dir)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment