Robert Klemme wrote:

> I'm not sure what you're at here.  You posted code from the Ruby
> interpreter but the magical bit of shebang is done by the shell or OS
> not Ruby.

Bear in mind that if the shell started the program and the program 
specified on the shebang line wasn't the ruby interpreter, the code 
quoted above doesn't run.

Since it is running, somehow the ruby interpreter has been started and 
given a file containing text that may or may not actually be Ruby code. 
This could happen if you started ruby by explicitly executing the "ruby" 
command, or if you're running on Windows where there is no shell to do 
shebang interpreting for you.

That bit of code inspects the shebang line and, if the word "ruby" 
doesn't appear on the line, it tries to execute what it assumes is a 
program.

If you have access to Ruby on Windows, try it yourself.
-- 
Posted via http://www.ruby-forum.com/.