Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace puts with write in README.md for dir recursion #289

Merged
merged 1 commit into from Dec 21, 2016

Conversation

Meatballs1
Copy link
Contributor

@Meatballs1 Meatballs1 commented May 9, 2016

The instructions for zipping a directory recursively uses puts:

  def put_into_archive(disk_file_path, io, zip_file_path)
    io.get_output_stream(zip_file_path) do |f|
      f.puts(File.open(disk_file_path, 'rb').read)
    end
  end

This appends a newline character 0x0A at the end of each file, which has just caused me a number of headaches :)

@coveralls
Copy link

coveralls commented May 9, 2016

Coverage Status

Coverage decreased (-0.04%) to 93.972% when pulling c0dccb1 on Meatballs1:fix_readme_dir_recursion into 7aa3666 on rubyzip:master.

@simonoff simonoff merged commit f34c1d9 into rubyzip:master Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants