upgrade to ruby 2.0.0

This commit is contained in:
r888888888
2014-02-26 13:16:34 -08:00
parent 3a81ae2186
commit ec0280bcde
4 changed files with 8 additions and 5 deletions

View File

@@ -204,13 +204,13 @@ class Upload < ActiveRecord::Base
def file_header_to_content_type(source_path)
case File.read(source_path, 10)
when /^\xff\xd8/
when /^\xff\xd8/n
"image/jpeg"
when /^GIF87a/, /^GIF89a/
"image/gif"
when /^\x89PNG\r\n\x1a\n/
when /^\x89PNG\r\n\x1a\n/n
"image/png"
when /^CWS/, /^FWS/, /^ZWS/