metafiles: use Set.new instead of Array#to_set
This commit is contained in:
parent
ce33f593b4
commit
9628a613cf
@ -2,14 +2,14 @@ require "set"
|
|||||||
|
|
||||||
class Metafiles
|
class Metafiles
|
||||||
# https://github.com/github/markup#markups
|
# https://github.com/github/markup#markups
|
||||||
EXTENSIONS = %w[
|
EXTENSIONS = Set.new %w[
|
||||||
.adoc .asc .asciidoc .creole .html .markdown .md .mdown .mediawiki .mkdn
|
.adoc .asc .asciidoc .creole .html .markdown .md .mdown .mediawiki .mkdn
|
||||||
.org .pod .rdoc .rst .rtf .textile .txt .wiki
|
.org .pod .rdoc .rst .rtf .textile .txt .wiki
|
||||||
].to_set.freeze
|
].freeze
|
||||||
BASENAMES = %w[
|
BASENAMES = Set.new %w[
|
||||||
about authors changelog changes copying copyright history license licence
|
about authors changelog changes copying copyright history license licence
|
||||||
news notes notice readme todo
|
news notes notice readme todo
|
||||||
].to_set.freeze
|
].freeze
|
||||||
|
|
||||||
def self.list?(file)
|
def self.list?(file)
|
||||||
return false if %w[.DS_Store INSTALL_RECEIPT.json].include?(file)
|
return false if %w[.DS_Store INSTALL_RECEIPT.json].include?(file)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user