samples/example_recursive.rb in rubyzip-2.4.rc1 vs samples/example_recursive.rb in rubyzip-3.0.0.alpha

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'zip' # This is a simple example which uses rubyzip to # recursively generate a zip file from the contents of # a specified directory. The directory itself is not @@ -19,10 +21,10 @@ # Zip the input directory. def write entries = Dir.entries(@input_dir) - %w[. ..] - ::Zip::File.open(@output_file, ::Zip::File::CREATE) do |zipfile| + ::Zip::File.open(@output_file, create: true) do |zipfile| write_entries entries, '', zipfile end end private