return_bang 1.0
drbrain |
return_bang version 1.0 has been released!
return_bang implements non-local exits from methods. Use return_bang to exit back to a processing loop from deeply nested code, or just to confound your enemies and your friends! What could possibly go wrong?
Features
-
Implements non-local exits for methods
-
Nestable
-
Named and stack-based exit points, go exactly where you need to be
-
Ignores pesky ensure blocks for when you really, really need to return
Synopsis
require 'return_bang/everywhere' def some_method deeply_nested # never reached end def deeply_nested return! end return_here do some_method end # resumes here
Testimonials
“you’ll wind up with your cock in /dev/null somehow” – slyphon
“Haha! Right! This skips ensure… SO EVIL‼‼” – drbrain
“This is so evil that 6 def test_… have turned into: 16 tests, 65 assertions, 18 failures, 7 errors” – drbrain
Install
sudo gem install return_bangcomment
Comments are disabled


