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:
parent
ba64c28304
commit
a677c15e86
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue