1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Use tr instead of gsub

This commit is contained in:
Mario Finelli 2020-02-18 17:19:52 -05:00
parent 5548212f47
commit 49f21894d3
No known key found for this signature in database
GPG key ID: 6C3ADDDE36FDA306

View file

@ -62,7 +62,7 @@ module Rack
# Set these key values to boolean 'true' to include in policy
NO_ARG_DIRECTIVES.each do |d|
if options.key?(d) && options[d].is_a?(TrueClass)
directives << d.to_s.gsub(/_/, '-')
directives << d.to_s.tr('_', '-')
end
end