Merge pull request #4821 from reitermarkus/p7zip-from-type

Fix detecting `P7Zip` from symbol.
This commit is contained in:
Markus Reiter 2018-09-05 00:43:55 +02:00 committed by GitHub
commit 8a28271ba8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ module UnpackStrategy
}.fetch(type, type)
begin
const_get(type.to_s.split("_").map(&:capitalize).join)
const_get(type.to_s.split("_").map(&:capitalize).join.gsub(/\d+[a-z]/, &:upcase))
rescue NameError
nil
end