Skip to content

Commit

Permalink
when available, use mime/types/columnar which is more memory efficient
Browse files Browse the repository at this point in the history
  • Loading branch information
midu committed May 28, 2015
1 parent 6e4ee22 commit 5bd2ff4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/refile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
require "tempfile"
require "rest_client"
require "logger"
require "mime/types"

begin

# Use mime/types/columnar if available, for reduced memory usage
require "mime/types/columnar"
rescue LoadError
require "mime/types"
end

module Refile
# @api private
Expand Down

0 comments on commit 5bd2ff4

Please sign in to comment.