summaryrefslogtreecommitdiff
path: root/lib/mime.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mime.rb')
-rw-r--r--lib/mime.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/mime.rb b/lib/mime.rb
index 8696894..52bc531 100644
--- a/lib/mime.rb
+++ b/lib/mime.rb
@@ -18,7 +18,7 @@ class << MIME
when :private, :protected
"and will be #{message}"
when nil
- "and will be removed"
+ 'and will be removed'
else
message
end
@@ -30,7 +30,7 @@ class << MIME
# Provide a single warning about this fact in the interim.
def const_missing(name) # :nodoc:
case name.to_s
- when "InvalidContentType"
+ when 'InvalidContentType'
warn_about_moved_constants(name)
MIME::Type.const_get(name.to_sym)
else
@@ -39,7 +39,10 @@ class << MIME
end
private
+
def warn_about_moved_constants(name) # :nodoc:
- warn "#{caller[1]}: MIME::#{name} is deprecated. Use MIME::Type::#{name} instead."
+ warn <<-warning.chomp
+#{caller[1]}: MIME::#{name} is deprecated. Use MIME::Type::#{name} instead.
+ warning
end
end