[SCM] vim-addon-manager packaging branch, master, updated. v0.4.4-52-geef7258
Antonio Terceiro
terceiro at debian.org
Tue Jan 31 23:33:05 UTC 2012
The following commit has been merged in the master branch:
commit e6014a0a27e8b3af37ea5cdfdaafc94f2dbb6641
Author: Antonio Terceiro <terceiro at debian.org>
Date: Sun Jan 22 09:07:56 2012 -0200
Fixcrash with empty registry files on Ruby 1.8
diff --git a/lib/vim/addon_manager/registry.rb b/lib/vim/addon_manager/registry.rb
index 20ed86a..fdb6029 100644
--- a/lib/vim/addon_manager/registry.rb
+++ b/lib/vim/addon_manager/registry.rb
@@ -41,8 +41,10 @@ module Vim
Dir.glob(File.join(dir, '*.yaml')).each do |yaml|
stream = YAML.load_stream(File.read(yaml))
stream = stream.documents if stream.respond_to?(:documents) # Ruby 1.8 compatibility
- stream.each do |ydoc|
- yield(Addon.new(ydoc, basedir)) if ydoc
+ if stream
+ stream.each do |ydoc|
+ yield(Addon.new(ydoc, basedir)) if ydoc
+ end
end
end
end
diff --git a/spec/data/addons/syntax/bar.vim b/spec/data/registry/bogus1.yaml
similarity index 100%
copy from spec/data/addons/syntax/bar.vim
copy to spec/data/registry/bogus1.yaml
--
vim-addon-manager packaging
More information about the pkg-vim-maintainers
mailing list