diff options
| author | Markus Reiter | 2016-09-23 22:02:23 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-09-24 12:24:35 +0200 |
| commit | 58e36c73193befb57d351344cea2a4a33fef850d (patch) | |
| tree | 3d26751835440341e5a42a189cf580e6253785df /Library/Homebrew/extend/fileutils.rb | |
| parent | bbc3f1c3a852e6cfd26a7a7c333092fae0520eb4 (diff) | |
| download | brew-58e36c73193befb57d351344cea2a4a33fef850d.tar.bz2 | |
Fix Style/GuardClause.
Diffstat (limited to 'Library/Homebrew/extend/fileutils.rb')
| -rw-r--r-- | Library/Homebrew/extend/fileutils.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Homebrew/extend/fileutils.rb b/Library/Homebrew/extend/fileutils.rb index b889f9ded..8b8d21da4 100644 --- a/Library/Homebrew/extend/fileutils.rb +++ b/Library/Homebrew/extend/fileutils.rb @@ -89,10 +89,9 @@ module FileUtils # A version of mkdir that also changes to that folder in a block. def mkdir(name, &_block) old_mkdir(name) - if block_given? - chdir name do - yield - end + return unless block_given? + chdir name do + yield end end module_function :mkdir |
