Permalink
Browse files

Clean up Mime::Type and remove deprecated stuff (from 2.3).

  • Loading branch information...
1 parent 9f92563 commit 525382f638bce6addc3f77074770c4141864137b @josevalim josevalim committed Mar 19, 2010
Showing with 1 addition and 7 deletions.
  1. +1 −7 actionpack/lib/action_dispatch/http/mime_type.rb
@@ -52,12 +52,6 @@ class Type
cattr_reader :browser_generated_types
attr_reader :symbol
- @@unverifiable_types = Set.new [:text, :json, :csv, :xml, :rss, :atom, :yaml]
- def self.unverifiable_types
- ActiveSupport::Deprecation.warn("unverifiable_types is deprecated and has no effect", caller)
- @@unverifiable_types
- end
-
# A simple helper class used in parsing the accept header
class AcceptItem #:nodoc:
attr_accessor :order, :name, :q
@@ -100,7 +94,7 @@ def register_alias(string, symbol, extension_synonyms = [])
end
def register(string, symbol, mime_type_synonyms = [], extension_synonyms = [], skip_lookup = false)
- Mime.instance_eval { const_set symbol.to_s.upcase, Type.new(string, symbol, mime_type_synonyms) }
+ Mime.const_set(symbol.to_s.upcase, Type.new(string, symbol, mime_type_synonyms))
SET << Mime.const_get(symbol.to_s.upcase)

0 comments on commit 525382f

Please sign in to comment.