From 525382f638bce6addc3f77074770c4141864137b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 20 Mar 2010 00:28:27 +0100 Subject: Clean up Mime::Type and remove deprecated stuff (from 2.3). --- actionpack/lib/action_dispatch/http/mime_type.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'actionpack/lib/action_dispatch/http/mime_type.rb') diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb index 13c0f2bad0..3f1a77295d 100644 --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ b/actionpack/lib/action_dispatch/http/mime_type.rb @@ -52,12 +52,6 @@ module Mime 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 @@ module Mime 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) -- cgit v1.2.3