{"id":16944906,"url":"https://github.com/drbrain/return_bang","last_synced_at":"2025-04-11T16:31:03.966Z","repository":{"id":2084107,"uuid":"3023661","full_name":"drbrain/return_bang","owner":"drbrain","description":"return_bang implements non-local exits from methods","archived":false,"fork":false,"pushed_at":"2012-04-01T20:08:29.000Z","size":104,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-15T03:09:34.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://docs.seattlerb.org/return_bang","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drbrain.png","metadata":{"files":{"readme":"README.rdoc","changelog":"History.txt","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-21T00:29:18.000Z","updated_at":"2013-10-07T14:26:34.000Z","dependencies_parsed_at":"2022-08-20T15:20:06.353Z","dependency_job_id":null,"html_url":"https://github.com/drbrain/return_bang","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drbrain%2Freturn_bang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drbrain%2Freturn_bang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drbrain%2Freturn_bang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drbrain%2Freturn_bang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drbrain","download_url":"https://codeload.github.com/drbrain/return_bang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248441225,"owners_count":21103947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T21:19:22.643Z","updated_at":"2025-04-11T16:31:03.742Z","avatar_url":"https://github.com/drbrain.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= return_bang\n\nhome :: https://github.com/drbrain/return_bang\nrdoc :: http://docs.seattlerb.org/return_bang\nbugs :: https://github.com/drbrain/return_bang/issues\n\n== Description\n\nreturn_bang implements non-local exits for methods.  As a bonus, you also get\nexception handling that ignores standard Ruby's inflexible begin; rescue;\nensure; end syntax.\n\nUse return_bang to exit back to a processing loop from deeply nested code, or\njust to confound your enemies *and* your friends!  What could possibly go\nwrong?\n\n== Features\n\n* Implements non-local exits for methods\n* Nestable\n* Named and stack-based exit points, go exactly where you need to be\n* Full exception handling support through raise!, rescue! and ensure!\n* Ignores pesky ensure, rescue and require blocks for when you really, really\n  need to return\n\n== Problems\n\n* Not enough use of continuations\n\n== Synopsis\n\n  require 'return_bang/everywhere'\n\n  def some_method\n    deeply_nested\n    # never reached\n  end\n\n  def deeply_nested\n    return!\n  end\n\n  return_here do\n    some_method\n  end\n  # resumes here\n\n== Testimonials\n\n\"you'll wind up with your cock in /dev/null somehow\" -- slyphon\n\n\"Haha! Right! This skips ensure… SO EVIL‼‼\" -- drbrain\n\n\"This is so evil that 6 def test_… have turned into: 16 tests, 65 assertions,\n18 failures, 7 errors\" -- drbrain\n\n== Install\n\n  sudo gem install return_bang\n\n== Developers\n\nAfter checking out the source, run:\n\n  $ rake newb\n\nThis task will install any missing dependencies, run the tests/specs,\nand generate the RDoc.\n\n== License\n\n(The MIT License)\n\nCopyright (c) Eric Hodel\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbrain%2Freturn_bang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrbrain%2Freturn_bang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbrain%2Freturn_bang/lists"}