From: Robert Klemme Date: 2008-02-06T01:42:09+09:00 Subject: Re: how to say # in ruby 2008/2/5, Gerry Ford : > Tim Hunter wrote: > > Dan Ford wrote: > >> TIA. > >> -- > > > > Welcome to Ruby! > > > > "This" is a mailing list called ruby-talk. It's gated to the > > comp.lang.ruby newsgroup if you're more comfortable with USENET. There > > are no moderators. There are many regulars. > > Well, you sound friendly enough. I looked with my news client at > comp.lang.ruby, and these messages are, to my surprise, there for the > perusal. I've updated this site to match my usenet pseudonym. Welcome! > I wanted > to make # the original subject, but the forum software demanded that I > embellish. > > #!/usr/bin/env ruby > > require 'rubygems' > require 'fruit_processor' > > #if __FILE__ == $0 > processor = FruitProcessor.new > ARGV[0] == nil ? dir = "." : dir = ARGV[0] You could as well do dir = ARGV.shift || "." > processor.pre_process dir > #end > > My second question is about the shebang line: #! > I was surprised to find that it matters what's written here when using > the windows platform. There is no env folder in the bin folder, so if > that's a path, then it's a path to nowhere. What "should" the first > line say? I personally use Ruby on cygwin and most of the time my shebang line looks like this: #!/bin/env ruby No idea about the Windows Ruby version - I haven't used that in ages. Kind regards robert -- use.inject do |as, often| as.you_can - without end