From 0196551e6039ca864d1eee1e01819fcae12c1dc9 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Mon, 29 Jul 2019 14:23:10 +0900 Subject: Use match? where we don't need MatchData --- actionpack/lib/action_dispatch/http/feature_policy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/http/feature_policy.rb') diff --git a/actionpack/lib/action_dispatch/http/feature_policy.rb b/actionpack/lib/action_dispatch/http/feature_policy.rb index 592b6e4393..78e982918d 100644 --- a/actionpack/lib/action_dispatch/http/feature_policy.rb +++ b/actionpack/lib/action_dispatch/http/feature_policy.rb @@ -33,7 +33,7 @@ module ActionDispatch #:nodoc: private def html_response?(headers) if content_type = headers[CONTENT_TYPE] - content_type =~ /html/ + /html/.match?(content_type) end end -- cgit v1.2.3