diff options
| author | Markus Reiter | 2017-05-18 09:39:07 +0200 |
|---|---|---|
| committer | GitHub | 2017-05-18 09:39:07 +0200 |
| commit | f0dc1d96c50551be69ea418148a9bc2d72cfaf16 (patch) | |
| tree | c94a8385e4832016644205b2f92d4bc1621931b4 /Library/Homebrew/cask/lib | |
| parent | 2b726383f1712e5a34627b4db9bed8b7b81973b2 (diff) | |
| parent | 5828eefd01cd61d2a7fbf439620b21f6f5b3d1b1 (diff) | |
| download | brew-f0dc1d96c50551be69ea418148a9bc2d72cfaf16.tar.bz2 | |
Merge pull request #2537 from reitermarkus/pathname-to_str
Remove `to_s` from some `Pathname`s.
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/artifact/relocated.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/relocated.rb b/Library/Homebrew/cask/lib/hbc/artifact/relocated.rb index 7757d32d0..4dba46c9d 100644 --- a/Library/Homebrew/cask/lib/hbc/artifact/relocated.rb +++ b/Library/Homebrew/cask/lib/hbc/artifact/relocated.rb @@ -35,10 +35,10 @@ module Hbc altnames = "(#{altnames})" # Some packges are shipped as u=rx (e.g. Bitcoin Core) - @command.run!("/bin/chmod", args: ["--", "u+rw", file.to_s, file.realpath.to_s]) + @command.run!("/bin/chmod", args: ["--", "u+rw", file, file.realpath]) @command.run!("/usr/bin/xattr", - args: ["-w", ALT_NAME_ATTRIBUTE, altnames, file.to_s], + args: ["-w", ALT_NAME_ATTRIBUTE, altnames, file], print_stderr: false) end diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb index aa795fc59..37784f4c3 100644 --- a/Library/Homebrew/cask/lib/hbc/cli.rb +++ b/Library/Homebrew/cask/lib/hbc/cli.rb @@ -113,7 +113,7 @@ module Hbc if command.respond_to?(:run) # usual case: built-in command verb command.run(*rest) - elsif require? which("brewcask-#{command}.rb").to_s + elsif require?(which("brewcask-#{command}.rb")) # external command as Ruby library on PATH, Homebrew-style elsif command.to_s.include?("/") && require?(command.to_s) # external command as Ruby library with literal path, useful |
