[vim-addon-manager] 03/03: addon_manager.rb: Properly serialize override_lines

James McCoy jamessan at debian.org
Tue Dec 3 05:50:59 UTC 2013


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch master
in repository vim-addon-manager.

commit ea14a643ead6c7b008d6ff31c082a2604bd05d2a
Author: James McCoy <jamessan at debian.org>
Date:   Tue Dec 3 00:41:23 2013 -0500

    addon_manager.rb: Properly serialize override_lines
    
    IO.write accepts a string to write and will coerce the argument to a
    string if it isn't one.  This was causing invalid vimscript (e.g., ["let
    loaded_vimplate = 1\n"]) to be written to plugin/000-vim-addons.vim.
    
    This is fixed by writing each element of override_lines instead of the
    array as a whole.
    
    Closes: #731191
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog         | 2 ++
 lib/vim/addon_manager.rb | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 3f32241..1146ff4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ vim-addon-manager (0.5.3) UNRELEASED; urgency=low
     #680624)
   * Fallback to using getent if $HOME isn't set.  Thanks to Helmut Grohne for
     the patch.  (Closes: #726329)
+  * Write each element of override_lines to 000-vim-addons.vim instead of a
+    stringified version of the array.  (Closes: #731191)
 
  -- James McCoy <jamessan at debian.org>  Mon, 02 Dec 2013 21:58:14 -0500
 
diff --git a/lib/vim/addon_manager.rb b/lib/vim/addon_manager.rb
index 7760dfa..5218622 100644
--- a/lib/vim/addon_manager.rb
+++ b/lib/vim/addon_manager.rb
@@ -136,7 +136,9 @@ module Vim
         FileUtils.rm override_file if File.exist? override_file
       elsif override_lines.hash != checksum
         File.open(override_file, 'w') do |file|
-          file.write override_lines
+          override_lines.each do |line|
+            file.write line
+          end
         end
       end
     end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim-addon-manager.git



More information about the pkg-vim-maintainers mailing list