summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
authorEtienne Massip <etienne.massip@gmail.com>2012-07-10 20:23:49 +0000
committerEtienne Massip <etienne.massip@gmail.com>2012-07-10 20:23:49 +0000
commit9c9b0a4150e3a83a8ce9f81259f73002b7b9c81e (patch)
treec4e388265ed968eb32ff6fe9461a914d81cc6801 /lib/plugins
parent7502ac484eb178bd8e97141a34ca4513e16ec44f (diff)
downloadredmine-9c9b0a4150e3a83a8ce9f81259f73002b7b9c81e.tar.gz
redmine-9c9b0a4150e3a83a8ce9f81259f73002b7b9c81e.zip
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9971 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/plugins')
-rwxr-xr-xlib/plugins/rfpdf/lib/tcpdf.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/plugins/rfpdf/lib/tcpdf.rb b/lib/plugins/rfpdf/lib/tcpdf.rb
index 83996bd09..de62859a1 100755
--- a/lib/plugins/rfpdf/lib/tcpdf.rb
+++ b/lib/plugins/rfpdf/lib/tcpdf.rb
@@ -2064,11 +2064,10 @@ class TCPDF
img = Magick::ImageList.new(file)
img.format = "PNG" # convert to PNG from gif
img.opacity = 0 # PNG alpha channel delete
- File.open( @@k_path_cache + File::basename(file), 'w'){|f|
+ open( @@k_path_cache + File::basename(file), 'w') do |f|
f.binmode
f.print img.to_blob
- f.close
- }
+ end
info=parsepng( @@k_path_cache + File::basename(file));
File.delete( @@k_path_cache + File::basename(file))
else