[#2367] Standard libraries — Dave Thomas <dave@...>

From ruby-dev summary:

60 messages 2004/02/11

[#2397] PATCH: deprecate cgi-lib, getopts, importenv, parsearg from standard library — Gavin Sinclair <gsinclair@...>

Index: cgi-lib.rb

15 messages 2004/02/12

[#2465] PATCH: OpenStruct#initialize to yield self — Gavin Sinclair <gsinclair@...>

This is a common approach I use to object initialization; I don't know

24 messages 2004/02/19

Re: $-<char> variables

From: Dave Thomas <dave@...>
Date: 2004-02-27 13:56:34 UTC
List: ruby-core #2517
On Feb 27, 2004, at 2:56, Yukihiro Matsumoto wrote:

> $-<char> variable correspond with -<char> option to the interpreter.
> If the interpreter has correspond command line option, the variable
> has its value, otherwise nil.

Matz:

The reason I ask is that older interpreters used to allow  $-<anything> 
as a valid variable. The new ones don't, but at the same time there's 
the following comment in yylex:

	  case '-':
	    tokadd('$');
	    tokadd(c);
	    c = nextc();
	    tokadd(c);
	    tokfix();
	    yylval.id = rb_intern(tok());
	    /* xxx shouldn't check if valid option variable */
	    return tGVAR;

And it seems to allow constructs such as

      :$-@


Cheers

Dave


In This Thread