Module: Paperclip::TempfileEncoding

Defined in:
lib/paperclip/tempfile.rb

Instance Method Summary collapse

Instance Method Details

#binmodeObject

This overrides Tempfile#binmode to make sure that the extenal encoding for binary mode is ASCII-8BIT. This behavior is what’s in CRuby, but not in JRuby



34
35
36
37
# File 'lib/paperclip/tempfile.rb', line 34

def binmode
  set_encoding('ASCII-8BIT')
  super
end