From: windwiny Date: 2013-04-27T11:48:35+09:00 Subject: Re: what is the $- magic global? --047d7b15b0d78820a804db4e9887 Content-Type: text/plain; charset=UTF-8 $xxxx is create a global variable, or return nil (if it is not ruby predefined). xxxx is valid variable name. 2013/4/27 Stu > It's not documented in English.rb so it has not been aliased to a > REALLY_LONG_VARIABLE_4JAVA_DEVS > > The posix shell definition for $- is: > > $- (hyphen) Expands to the current option flags (the single-letter > option names concatenated into a string) as specified on invoca- > tion, by the *set* built-in command, or implicitly by the shell. > > I see no reason for ruby to have it defined differently. > > English.rb is well documented in 2.0: > > # $ERROR_INFO:: $! > > > # $ERROR_POSITION:: $@ > # $FS:: $; > # $FIELD_SEPARATOR:: $; > # $OFS:: $, > # $OUTPUT_FIELD_SEPARATOR:: $, > # $RS:: $/ > # $INPUT_RECORD_SEPARATOR:: $/ > > > # $ORS:: $\ > # $OUTPUT_RECORD_SEPARATOR:: $\ > # $INPUT_LINE_NUMBER:: $. > # $NR:: $. > # $LAST_READ_LINE:: $_ > # $DEFAULT_OUTPUT:: $> > # $DEFAULT_INPUT:: $< > > > # $PID:: $$ > # $PROCESS_ID:: $$ > # $CHILD_STATUS:: $? > # $LAST_MATCH_INFO:: $~ > # $IGNORECASE:: $= > # $ARGV:: $* > # $MATCH:: $& > > > # $PREMATCH:: $` > # $POSTMATCH:: $' > # $LAST_PAREN_MATCH:: $+ > > --047d7b15b0d78820a804db4e9887 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
$xxxx is create a global variable, =C2=A0or return nil (if= it is not ruby predefined).=C2=A0

xxxx is valid variabl= e name.


2013/4/27 Stu <stu@rubyprogrammer.net>
It's not documente= d in English.rb so it has not been aliased to a REALLY_LONG_VARIABLE_4JAVA_= DEVS

The posix shell definition for $- is:
$-      (hyphen) Ex=
pands to the current option flags (the single-letter
	     option names concatenated into a string) as specified on invoca-
	     tion, by the set built-in command, or implicitly by the shell.=


I see no reason for ruby to have it defined differently.=


English.rb is well documented in 2.0:

# $ERROR_I= NFO:: $!
# $ERROR_POSITION:: $@
# $FS:: $;
# = $FIELD_SEPARATOR:: $;
# $OFS:: $,
# $OU= TPUT_FIELD_SEPARATOR:: $,
# $RS:: $/
# $INPUT= _RECORD_SEPARATOR:: $/
# $ORS:: $\
# $OUTPUT_RECORD_SEPARATOR:: $\
# = $INPUT_LINE_NUMBER:: $.
# $NR:: $.
# $LA= ST_READ_LINE:: $_
# $DEFAULT_OUTPUT:: $>
# $DE= FAULT_INPUT:: $<
# $PID:: $$
# $PROCESS_ID:: $$
# = $CHILD_STATUS:: $?
# $LAST_MATCH_INFO:: $~
# $IG= NORECASE:: $=3D
# $ARGV:: $*
# $MAT= CH:: $&
# $PREMATCH:: $`
# $POSTMATCH:: $'# $LAST_PAREN_MATCH:: $+

--047d7b15b0d78820a804db4e9887--