Checking to see if a directory exists in ruby

This was the winning code:


path="/some/path"
if File.exists?(path) && File.directory?(path)
puts "yeeha"
else
puts "bummer"
end

from this source http://www.ruby-forum.com/topic/135748