summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-07-03 08:39:57 +0900
committerRandy Morgan <[email protected]>2012-07-03 08:39:57 +0900
commit807c9a3caccc9e96d06c31d8d55c1817e4718c0d (patch)
treea5c3f4fe93bf7285b313639d544969eae4d4ffbf
parentcf9cc42d6ef1d2d995600290693377cd5f06c270 (diff)
downloadcaxlsx-807c9a3caccc9e96d06c31d8d55c1817e4718c0d.tar.gz
caxlsx-807c9a3caccc9e96d06c31d8d55c1817e4718c0d.zip
remote directory code as it was not the cause of #81
-rw-r--r--lib/axlsx/package.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/axlsx/package.rb b/lib/axlsx/package.rb
index d03a1738..c98e3e89 100644
--- a/lib/axlsx/package.rb
+++ b/lib/axlsx/package.rb
@@ -156,18 +156,18 @@ module Axlsx
# @return [Zip::ZipOutputStream]
def write_parts(zip)
p = parts
- p.each do |part|
- unless part[:doc].nil?
- zip.put_next_entry(part[:entry]);
- entry = ['1.9.2', '1.9.3'].include?(RUBY_VERSION) ? part[:doc].force_encoding('BINARY') : part[:doc]
- zip.puts(entry)
- end
- unless part[:path].nil?
- zip.put_next_entry(part[:entry]);
- # binread for 1.9.3
- zip.write IO.respond_to?(:binread) ? IO.binread(part[:path]) : IO.read(part[:path])
- end
+ p.each do |part|
+ unless part[:doc].nil?
+ zip.put_next_entry(part[:entry])
+ entry = ['1.9.2', '1.9.3'].include?(RUBY_VERSION) ? part[:doc].force_encoding('BINARY') : part[:doc]
+ zip.puts(entry)
end
+ unless part[:path].nil?
+ zip.put_next_entry(part[:entry]);
+ # binread for 1.9.3
+ zip.write IO.respond_to?(:binread) ? IO.binread(part[:path]) : IO.read(part[:path])
+ end
+ end
zip
end