diff options
| author | Mike McQuaid | 2016-09-24 20:48:03 +0100 | 
|---|---|---|
| committer | Mike McQuaid | 2016-09-24 20:48:03 +0100 | 
| commit | e767fd3df9d179fca0445cc0bc0fdc061ad857d6 (patch) | |
| tree | 93e9db33313b36eebe7d7fb3aedf0f92cc2c3918 /Library/Homebrew/extend/fileutils.rb | |
| parent | 7fc241765e3654718235791c32e5638bf7f8e15a (diff) | |
| parent | 232078df57418004bb9bf7abef877e734fcf7005 (diff) | |
| download | brew-e767fd3df9d179fca0445cc0bc0fdc061ad857d6.tar.bz2 | |
Merge branch 'master' into mkdir_with_intermediates
Diffstat (limited to 'Library/Homebrew/extend/fileutils.rb')
| -rw-r--r-- | Library/Homebrew/extend/fileutils.rb | 11 | 
1 files changed, 5 insertions, 6 deletions
| diff --git a/Library/Homebrew/extend/fileutils.rb b/Library/Homebrew/extend/fileutils.rb index 3a2b32481..4f20d36a3 100644 --- a/Library/Homebrew/extend/fileutils.rb +++ b/Library/Homebrew/extend/fileutils.rb @@ -84,15 +84,14 @@ module FileUtils    end    # @private -  alias_method :old_mkdir, :mkdir +  alias old_mkdir mkdir    # A version of mkdir that also changes to that folder in a block.    def mkdir(name, &_block)      mkdir_p(name) -    if block_given? -      chdir name do -        yield -      end +    return unless block_given? +    chdir name do +      yield      end    end    module_function :mkdir @@ -122,7 +121,7 @@ module FileUtils    if method_defined?(:ruby)      # @private -    alias_method :old_ruby, :ruby +    alias old_ruby ruby    end    # Run the `ruby` Homebrew is using rather than whatever is in the `PATH`. | 
