You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2013/10/11 23:07:41 UTC

svn commit: r1531418 - /buildr/trunk/lib/buildr/packaging/archive.rb

Author: donaldp
Date: Fri Oct 11 21:07:41 2013
New Revision: 1531418

URL: http://svn.apache.org/r1531418
Log:
Ensure that the options variable is always defined, even if defined as nil

Modified:
    buildr/trunk/lib/buildr/packaging/archive.rb

Modified: buildr/trunk/lib/buildr/packaging/archive.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/packaging/archive.rb?rev=1531418&r1=1531417&r2=1531418&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/packaging/archive.rb (original)
+++ buildr/trunk/lib/buildr/packaging/archive.rb Fri Oct 11 21:07:41 2013
@@ -62,7 +62,7 @@ module Buildr #:nodoc:
       #   include(:from=>path) => self
       #   include(*files, :merge=>true) => self
       def include(*args)
-        options = args.pop if Hash === args.last
+        options = Hash === args.last ? args.pop : nil
         files = to_artifacts(args)
         raise 'AchiveTask.include() values should not include nil' if files.include? nil