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



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

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