Project

goto

0.01
No commit activity in last 3 years
No release in over 3 years
==== Goto for Ruby This is a simple label-based goto for ruby. Just to show that it can be done. Also to show that even though ruby may support certain features, even features that may be terribly abusable, does not mean that everyone will, in fact, terribly abuse them. ;-) ==== Facts * Category: Library/Evil * Status: squishy * Created: 2003-06-06 05:06:14 GMT * Creator: Ryan Pavlik
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

ruby-goto

ruby-goto, version –1.0, by Ryan Pavlik

‘goto’ for ruby. :-)

  • Category: Library/Evil
  • Status: squishy
  • Created: 2003-06-06 05:06:14 GMT

Description

This is a simple label-based goto for ruby. Just to show that it can be done.

Also to show that even though ruby may support certain features, even features that may be terribly abusable, does not mean that everyone will, in fact, terribly abuse them. ;-)

Example

require 'goto'

frame_start

label(:a) do
  puts "a"
end

label(:b) do
  puts "b"
  goto :a if rand > 0.1
end

frame_end

License

GPL