aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/feature_policy.rb
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2019-07-29 14:23:10 +0900
committerAkira Matsuda <ronnie@dio.jp>2019-07-29 14:23:10 +0900
commit0196551e6039ca864d1eee1e01819fcae12c1dc9 (patch)
tree899db0e49063164697a005bca64fc5b06c2a2cfc /actionpack/lib/action_dispatch/http/feature_policy.rb
parent0d981a2b3d26958f19e0613db8e5f480a34dd8fc (diff)
downloadrails-0196551e6039ca864d1eee1e01819fcae12c1dc9.tar.gz
rails-0196551e6039ca864d1eee1e01819fcae12c1dc9.tar.bz2
rails-0196551e6039ca864d1eee1e01819fcae12c1dc9.zip
Use match? where we don't need MatchData
Diffstat (limited to 'actionpack/lib/action_dispatch/http/feature_policy.rb')
-rw-r--r--actionpack/lib/action_dispatch/http/feature_policy.rb2
1 files changed, 1 insertions, 1 deletions
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