aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorganesh <ganesh@ganesh-Studio-1558.(none)>2012-06-11 22:57:11 +0530
committerganesh <ganesh@ganesh-Studio-1558.(none)>2012-06-11 22:57:11 +0530
commitc74662a27f642700d3e59482bef6e6bc7e84b5ba (patch)
tree0f0a231a92960cf62dab69d045e2146130c75b5f /actionpack/lib/action_dispatch
parent04a7426a2e2567a0e2101c98711393fdfc40160e (diff)
downloadrails-c74662a27f642700d3e59482bef6e6bc7e84b5ba.tar.gz
rails-c74662a27f642700d3e59482bef6e6bc7e84b5ba.tar.bz2
rails-c74662a27f642700d3e59482bef6e6bc7e84b5ba.zip
both string and sumbol will be interpolated as string no need to convert to_s
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/http/mime_type.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb
index 0eaae80461..ee1913dbf9 100644
--- a/actionpack/lib/action_dispatch/http/mime_type.rb
+++ b/actionpack/lib/action_dispatch/http/mime_type.rb
@@ -99,9 +99,9 @@ module Mime
end
def register(string, symbol, mime_type_synonyms = [], extension_synonyms = [], skip_lookup = false)
- Mime.const_set(symbol.to_s.upcase, Type.new(string, symbol, mime_type_synonyms))
+ Mime.const_set(symbol.upcase, Type.new(string, symbol, mime_type_synonyms))
- SET << Mime.const_get(symbol.to_s.upcase)
+ SET << Mime.const_get(symbol.upcase)
([string] + mime_type_synonyms).each { |str| LOOKUP[str] = SET.last } unless skip_lookup
([symbol] + extension_synonyms).each { |ext| EXTENSION_LOOKUP[ext.to_s] = SET.last }
@@ -194,7 +194,7 @@ module Mime
#
# Mime::Type.unregister(:mobile)
def unregister(symbol)
- symbol = symbol.to_s.upcase
+ symbol = symbol.upcase
mime = Mime.const_get(symbol)
Mime.instance_eval { remove_const(symbol) }