goto is considered bad style in higher level languages like C++ where try-finally statements can be used.  In ruby ensure blocks can be used similarly.  Here is a quote from the [linux kernel style guide](https://www.kernel.org/doc/Documentation/CodingStyle):

> 		Chapter 7: Centralized exiting of functions
> 
> Albeit deprecated by some people, the equivalent of the goto statement is
> used frequently by compilers in form of the unconditional jump instruction.
> 
> The goto statement comes in handy when a function exits from multiple
> locations and some common work such as cleanup has to be done.  If there is no
> cleanup needed then just return directly.
> 
> The rationale is:
> 
> - unconditional statements are easier to understand and follow
> - nesting is reduced
> - errors by not updating individual exit points when making
>     modifications are prevented
> - saves the compiler work to optimize redundant code away ;)
> 
> int fun(int a)
> {
> 	int result = 0;
> 	char *buffer = kmalloc(SIZE);
> 
> 	if (buffer == NULL)
> 		return -ENOMEM;
> 
> 	if (condition1) {
> 		while (loop1) {
> 			...
> 		}
> 		result = 1;
> 		goto out;
> 	}
> 	...
> out:
> 	kfree(buffer);
> 	return result;
> }