use delete! insteas of gsub

GSoC/Meterpreter_Web_Console
Kent 'picat' Gruber 2018-09-17 09:50:21 -04:00
parent bcf78e6067
commit c97a2ce626
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ module Auxiliary::MimeTypes
def mime_lookup_by_extension(extension)
return 'application/octet-stream' if extension.nil? or extension.empty?
if extension.starts_with? '.'
extension.gsub!('.','')
extension.delete!('.')
end
mtype = Mime::Type.lookup_by_extension(extension)
mtype = mime_yaml_lookup(extension) if mtype.nil?