Ruby 1.8.6 Hash#select returns an array of results

Which results in a "odd number of arguments for Hash" error.
This commit is contained in:
Tony La 2011-05-04 10:28:17 -04:00 committed by Mitchell Hashimoto
parent 800d2088c1
commit 593e2e628f
1 changed files with 1 additions and 0 deletions

View File

@ -115,6 +115,7 @@ module Vagrant
# Only mount the folders which have a guest path specified
am_folders = folders.select { |name, folder| folder[:guestpath] }
am_folders = Hash[*am_folders.flatten] if am_folders.is_a?(Array)
@env["vm"].system.mount_nfs(host_ip, Hash[am_folders])
end