tags:

views:

722

answers:

3

is there a way to start at a specified line ? like a goto command ?

+8  A: 

First, it would be statement, not a command. Second, see ruby-goto. Third, note

Category: Library/Evil

Sinan Ünür
Wow, "Category: Library/Evil".
LiraNuna
At first I thought this was a joke, but there actually Is a Category: Library/Evil. It currently includes ruby-goto as mentioned, as well as *segfault4r* : "Its a module that forces a segfault.
Colin
+1  A: 

I don't believe so (and, by all that's holy, it shouldn't).

But there's a goto module for it here if you're feeling really masochistic :-)

paxdiablo
A: 

There is the ruby command line switch -x.

 -x[directory]  Tells Ruby that the script is embedded in a message.
                Leading garbage will be discarded until the first that
                starts with “#!” and contains the string, “ruby”.  Any
                meaningful switches on that line will applied.  The end of
                script must be specified with either EOF, ^D (control-D),
                ^Z (control-Z), or reserved word __END__.  If the direc‐
                tory name is specified, Ruby will switch to that directory
                before executing script.

BTW, I'm pretty sure ruby-goto was, umm, a joke. I don't believe the d/l link has ever worked. Or am I just supposed to point people to it and keep quiet? I never know...

I liked Ryan's next line after announcing ruby-goto:

Stay tuned for the next evil module... ruby-malloc! Have a nice day.

Ryan is clearly a genius.

DigitalRoss