Kouhei Sutou 2019-03-03 05:50:03 +0900 (Sun, 03 Mar 2019) Revision: 4615b29d0c66376b266d21898cb494de7778be39 https://github.com/ranguba/chupa-text-decomposer-pdf/commit/4615b29d0c66376b266d21898cb494de7778be39 Message: Use IO.copy_stream Modified files: lib/chupa-text/decomposers/pdf.rb Modified: lib/chupa-text/decomposers/pdf.rb (+3 -1) =================================================================== --- lib/chupa-text/decomposers/pdf.rb 2019-03-03 05:49:30 +0900 (32b69e3) +++ lib/chupa-text/decomposers/pdf.rb 2019-03-03 05:50:03 +0900 (d5bfd0d) @@ -75,7 +75,9 @@ module ChupaText if path.nil? file = Tempfile.new(["chupa-text-decomposer-pdf", ".pdf"]) file.binmode - file.write(data.body) + data.open do |input| + IO.copy_stream(input, file) + end file.close path = file.path end -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190303/4c54edb4/attachment.html>