aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/debrew/exception.rb
diff options
context:
space:
mode:
authorJack Nagel2013-02-06 18:46:36 -0600
committerJack Nagel2013-02-06 19:04:43 -0600
commita75dd6e8a8308e3e83d8285c4aa6ff9b3d149cc2 (patch)
treeab71473cafae113983feb70094e7de5e32eb77bd /Library/Homebrew/debrew/exception.rb
parent46e49c4889cd4948fb18cefb075dd65b7800cf5c (diff)
downloadbrew-a75dd6e8a8308e3e83d8285c4aa6ff9b3d149cc2.tar.bz2
Split debrew up to faciliate test isolation
We want to be able to test the raise functionality without monkey-patching #raise on every object in the system, which is one of the side effects of loading debrew.rb.
Diffstat (limited to 'Library/Homebrew/debrew/exception.rb')
-rw-r--r--Library/Homebrew/debrew/exception.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/debrew/exception.rb b/Library/Homebrew/debrew/exception.rb
new file mode 100644
index 000000000..da8e56dae
--- /dev/null
+++ b/Library/Homebrew/debrew/exception.rb
@@ -0,0 +1,7 @@
+class Exception
+ attr_accessor :continuation
+
+ def restart(&block)
+ continuation.call block
+ end
+end