Use `next` instead of `return` for 1.8.x compatibility.

Since we're not calling this lambda from inside a method, the `return`
causes a LocalJumpError on 1.8.x. It appears this functionality works
fine on 1.9.x but we'd like to support both. The correct behavior
appears to use `next`.
This commit is contained in:
Mitchell Hashimoto 2012-06-23 10:47:01 -07:00
parent ba64c28304
commit a677c15e86
1 changed files with 2 additions and 2 deletions

View File

@ -143,14 +143,14 @@ I18n.load_path << File.expand_path("templates/locales/en.yml", Vagrant.source_ro
# A lambda that knows how to load plugins from a single directory.
plugin_load_proc = lambda do |directory|
# We only care about directories
return false if !directory.directory?
next false if !directory.directory?
# If there is a plugin file in the top-level directory, then load
# that up.
plugin_file = directory.join("plugin.rb")
if plugin_file.file?
load(plugin_file)
return true
next true
end
end