From 86cf3fb5faffa38a0337b4396926f53f8501e66f Mon Sep 17 00:00:00 2001 From: Evgeniy Dolzhenko Date: Sun, 25 Sep 2011 13:03:01 +0100 Subject: Implement Mime::Type#respond_to? (consistently with #method_missing) --- actionpack/lib/action_dispatch/http/mime_type.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb index fa2948c8db..8a9f9c4315 100644 --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ b/actionpack/lib/action_dispatch/http/mime_type.rb @@ -256,6 +256,10 @@ module Mime @@html_types.include?(to_sym) || @string =~ /html/ end + def respond_to?(method, include_private = false) #:nodoc: + super || method.to_s =~ /(\w+)\?$/ + end + private def method_missing(method, *args) if method.to_s =~ /(\w+)\?$/ -- cgit v1.2.3