From: Roger Pack Date: 2009-06-03T06:43:23+09:00 Subject: [ruby-core:23679] Re: feature request: Directory.dir? > Aw, heck, why not > > def Dir?(f); File.directory?(f); end > Dir?("/tmp") # => true > > and while we're at it: > > require 'fileutils' > def Dir!(f); FileUtils.makedirs(f); end > Dir?('/tmp/foo/bar') # => false > Dir!('/tmp/foo/bar') # => "/tmp/foo/bar" > Dir?('/tmp/foo/bar') # => true I like it :) -=r