diff options
| author | Markus Reiter | 2016-09-21 14:44:22 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-09-23 15:30:07 +0200 |
| commit | b5f8de8bf42d25fed56e71be8e95933030d6a52b (patch) | |
| tree | 213db2c28af8cea77a26a4904645d1b0eb120409 /Library/Homebrew/keg.rb | |
| parent | 4861ee6c2d5bdda8ae155a1fb1f4c66ff562732d (diff) | |
| download | brew-b5f8de8bf42d25fed56e71be8e95933030d6a52b.tar.bz2 | |
Fix Style/RegexpLiteral.
Diffstat (limited to 'Library/Homebrew/keg.rb')
| -rw-r--r-- | Library/Homebrew/keg.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index e49c8126b..65ce6480a 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -62,7 +62,7 @@ class Keg end # locale-specific directories have the form language[_territory][.codeset][@modifier] - LOCALEDIR_RX = /(locale|man)\/([a-z]{2}|C|POSIX)(_[A-Z]{2})?(\.[a-zA-Z\-0-9]+(@.+)?)?/ + LOCALEDIR_RX = %r{(locale|man)/([a-z]{2}|C|POSIX)(_[A-Z]{2})?(\.[a-zA-Z\-0-9]+(@.+)?)?} INFOFILE_RX = %r{info/([^.].*?\.info|dir)$} TOP_LEVEL_DIRECTORIES = %w[bin etc include lib sbin share var Frameworks].freeze ALL_TOP_LEVEL_DIRECTORIES = (TOP_LEVEL_DIRECTORIES + %w[lib/pkgconfig share/locale share/man opt]).freeze @@ -323,13 +323,13 @@ class Keg when "locale/locale.alias" then :skip_file when INFOFILE_RX then :info when LOCALEDIR_RX then :mkpath - when /^icons\/.*\/icon-theme\.cache$/ then :skip_file + when %r{^icons/.*/icon-theme\.cache$} then :skip_file # all icons subfolders should also mkpath - when /^icons\// then :mkpath + when %r{^icons/} then :mkpath when /^zsh/ then :mkpath when /^fish/ then :mkpath # Lua, Lua51, Lua53 all need the same handling. - when /^lua\// then :mkpath + when %r{^lua/} then :mkpath when %r{^guile/} then :mkpath when *SHARE_PATHS then :mkpath else :link @@ -367,7 +367,7 @@ class Keg # the :link strategy. However, for Foo.framework and # Foo.framework/Versions we have to use :mkpath so that multiple formulae # can link their versions into it and `brew [un]link` works. - if relative_path.to_s =~ /[^\/]*\.framework(\/Versions)?$/ + if relative_path.to_s =~ %r{[^/]*\.framework(/Versions)?$} :mkpath else :link |
