aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-03-18 00:11:49 -0500
committerJack Nagel2013-03-18 00:11:49 -0500
commit56fa23e07ee4ee27cd22babb1c1ce57bb5d2a7c6 (patch)
tree2002b93b610f5d0ce58e5730cbaf645db74eecad /Library
parent43a8e896e8806ca1a1ddc8d024e9903be4a60a20 (diff)
downloadbrew-56fa23e07ee4ee27cd22babb1c1ce57bb5d2a7c6.tar.bz2
cleaner: simplify verbose pathname extension
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cleaner.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/Library/Homebrew/cleaner.rb b/Library/Homebrew/cleaner.rb
index c3e060b1a..8d89b7698 100644
--- a/Library/Homebrew/cleaner.rb
+++ b/Library/Homebrew/cleaner.rb
@@ -64,7 +64,7 @@ class Cleaner
# Clean a single folder (non-recursively)
def clean_dir d
d.find do |path|
- path.extend(NoiseyPathname) if ARGV.verbose?
+ path.extend(NoisyPathname) if ARGV.verbose?
if path.directory?
# Stop cleaning this subtree if protected
@@ -87,14 +87,9 @@ class Cleaner
end
-
-class Pathname
- alias_method :orig_unlink, :unlink
-end
-
-module NoiseyPathname
+module NoisyPathname
def unlink
puts "rm: #{self}"
- orig_unlink
+ super
end
end