r836 - /trunk/utils/addons/src/vim/registry.rb

zack at users.alioth.debian.org zack at users.alioth.debian.org
Tue Jan 16 09:55:22 UTC 2007


Author: zack
Date: Tue Jan 16 10:55:22 2007
New Revision: 836

URL: http://svn.debian.org/wsvn/?sc=1&rev=836
Log:
support more than one yaml document in the same yaml file (as will happen in real-life)

Modified:
    trunk/utils/addons/src/vim/registry.rb

Modified: trunk/utils/addons/src/vim/registry.rb
URL: http://svn.debian.org/wsvn/trunk/utils/addons/src/vim/registry.rb?rev=836&op=diff
==============================================================================
--- trunk/utils/addons/src/vim/registry.rb (original)
+++ trunk/utils/addons/src/vim/registry.rb Tue Jan 16 10:55:22 2007
@@ -109,7 +109,11 @@
 	  Find.prune if File.directory? path
 	  if File.file? path
 	    Find.prune if path !~ /\.yaml$/
-	    yield(Addon.new(YAML.load_file(path)))
+	    File.open path do |f|
+	      YAML.load_documents f do |ydoc|
+		yield(Addon.new(ydoc))
+	      end
+	    end
 	  end
 	end
       end




More information about the pkg-vim-maintainers mailing list