On Thu, Jun 07, 2012 at 03:30:42AM +0900, andrew mcelroy wrote:
> On Wed, Jun 6, 2012 at 10:04 AM, Bartosz Dziewoski <matma.rex / gmail.com> wrote:
> > 2012/6/6 Raphael B. <lists / ruby-forum.com>:
> >> That could be achieved (though not on a per file basis) with the -K
> >> flag, but I've read the -K flag could become deprecated, and that magic
> >> comments are the future. I don't understand how comments can get such an
> >> importance in source code, and I want to learn more because I'm
> >> suspecting I am missing something.
> >
> > You can't always provide command-line options (or it might be troublesome).
> 
> It is also worth noting that in shell scripts (ruby use to be thought
> of as a scripting language primarily)
> that #!/shell/path like
> #!/bin/bash
> 
> is very common in perl and other shell script languages.
> So to see #utf-8 is to me more of a homage to declaring interpreter
> path than anything else.
> infact in a .cgi file
> #!/usr/bin/ruby is perfectly valid

I'm not entirely sure, but it looks like you're suggesting that nobody
uses a shebang line any longer.  I find that odd, considering I
constantly create new executable files that start like the following
line:

    #!/usr/bin/env ruby

These are not ".cgi file" programs, either.  They're mostly sysadmin
scripts, plus occasional widely reusable command line utilities including
a couple that come with a Ruby gem I just recently (last month) pushed to
gemcutter for the first time.  The shebang line is far from dead.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]