Permalink
Browse files

* convert n to n.to_i for Tempfile creation - ruby 1.9.2 sprintf doe…

…sn't make nil -> 0
  • Loading branch information...
1 parent a32cc6d commit bf7ffee6aa65de067300fe138a974385f2519d94 @bunnymatic bunnymatic committed Jun 28, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/dm-paperclip/processor.rb
@@ -43,7 +43,7 @@ class Tempfile < ::Tempfile
# Replaces Tempfile's +make_tmpname+ with one that honors file extensions.
def make_tmpname(basename, n)
extension = File.extname(basename)
- sprintf("%s,%d,%d%s", File.basename(basename, extension), $$, n, extension)
+ sprintf("%s,%d,%d%s", File.basename(basename, extension), $$, n.to_i, extension)
end
end
end

0 comments on commit bf7ffee

Please sign in to comment.