File Directory Ruby

full = '/home/matz/bin/ruby.exe'
File.split(full)             # => ['/home/matz/bin', 'ruby.exe']