From c91c2c10d8f4850c7d82434e3832beb7fdd2d187 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 13 Mar 2014 19:51:24 -0500 Subject: [PATCH] Add inspect methods to patch classes --- Library/Homebrew/patch.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Homebrew/patch.rb b/Library/Homebrew/patch.rb index 9e830c3ce2..95171840e4 100644 --- a/Library/Homebrew/patch.rb +++ b/Library/Homebrew/patch.rb @@ -78,6 +78,10 @@ class IOPatch < Patch # in case we are indirectly referenced by an exception later. @io = nil end + + def inspect + "#<#{self.class}: #{strip.inspect}>" + end end class ExternalPatch < Patch @@ -108,6 +112,10 @@ class ExternalPatch < Patch safe_system "/usr/bin/patch", "-g", "0", "-f", "-d", dir, "-#{strip}", "-i", patchfile end end + + def inspect + "#<#{self.class}: #{strip.inspect} #{url.inspect}>" + end end # Legacy patches have no checksum and are not cached