Skip to content

Commit

Permalink
* convert n to n.to_i for Tempfile creation - ruby 1.9.2 sprintf doe…
Browse files Browse the repository at this point in the history
…sn't make nil -> 0
  • Loading branch information
bunnymatic committed Jun 28, 2011
1 parent a32cc6d commit bf7ffee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dm-paperclip/processor.rb
Expand Up @@ -43,7 +43,7 @@ class Tempfile < ::Tempfile
# Replaces Tempfile's +make_tmpname+ with one that honors file extensions. # Replaces Tempfile's +make_tmpname+ with one that honors file extensions.
def make_tmpname(basename, n) def make_tmpname(basename, n)
extension = File.extname(basename) 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 end
end end

0 comments on commit bf7ffee

Please sign in to comment.