Consistency (was: Re: Python vs Ruby!)

> What does bother me here is that there seems to be no other way than
> using this ugly construct. (Did I miss something?)

Which one do you mean -- $0 or the $1 to $n ones? You can use
$PROGRAM_NAME instead of $0, and MatchData#captures for $1 to $n.
(Note: it doesn't stop at $9 :slight_smile:

ah, require "English".

I would opt for a

require 'Obfuscated'

instead :slight_smile: for the short once of course.

But right, typing another line would undermine the whole concept
of all these beauties. Ok, maybe in short scripts (perhaps even
throwaway scripts) this might make sense. As I said, it doesn't
bother me much.

Let's concentrate on the brighter sides of ruby...

Simon

Hi --

ยทยทยท

On Fri, 19 Aug 2005, Kroeger Simon (ext) wrote:

What does bother me here is that there seems to be no other way than
using this ugly construct. (Did I miss something?)

Which one do you mean -- $0 or the $1 to $n ones? You can use
$PROGRAM_NAME instead of $0, and MatchData#captures for $1 to $n.
(Note: it doesn't stop at $9 :slight_smile:

ah, require "English".

You don't have to:

   $ ruby -e 'p $PROGRAM_NAME'
   "-e"

David

--
David A. Black
dblack@wobblini.net