From 5828eefd01cd61d2a7fbf439620b21f6f5b3d1b1 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 27 Apr 2017 20:17:06 +0200 Subject: Remove `to_s` from some `Pathname`s. --- Library/Homebrew/cask/lib/hbc/artifact/relocated.rb | 4 ++-- Library/Homebrew/cask/lib/hbc/cli.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Library/Homebrew/cask/lib') 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 -- cgit v1.2.3