Defined?($&)

e$B$U$H5$$,$D$$$?$s$G$9$,!"e(Bdefined?($&) e$B$,e(B “expression”
e$B$K$J$je(B
e$B$^$9!#e(B

% ./ruby -ve ‘/./ =~ “a”; p defined?($&)’
ruby 1.9.0 (2007-11-22 patchlevel 0) [i686-linux]
“expression”

1.8 e$B$G$Oe(B “$&” e$B$G$9!#e(B

% ruby-1.8 -ve ‘/e$B!#e(B=~ “a”; p defined?($&)’
ruby 1.8.6 (2007-11-13 patchlevel 5000) [i686-linux]
“$&”

e$B0U?^E*$J$b$N$G$7$g$&$+!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:32330] defined?($&)”
on Thu, 22 Nov 2007 17:57:01 +0900, Tanaka A. [email protected]
writes:
|
|e$B$U$H5$$,$D$$$?$s$G$9$,!"e(Bdefined?($&) e$B$,e(B “expression” e$B$K$J$je(B
|e$B$^$9!#e(B

|1.8 e$B$G$Oe(B “$&” e$B$G$9!#e(B

|e$B0U?^E*$J$b$N$G$7$g$&$+!#e(B

1.8e$B$Ge(BBACKREF($&,
$1,…)e$B$,JQ?tL>$K$J$k$N$O0U?^E*$G$9!#e(B1.9e$B$Ge(B
expressione$B$K$J$C$F$$$k$N$,0U?^E*$+$I$&$+$OJ,$+$j$^$;$s$,!“;de(B
e$B$+$i$=$N$h$&$K$9$k$h$&$KMj$s$@$3$H$O$”$j$^$;$s!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:32338] Re: defined?($&)”
on Fri, 23 Nov 2007 11:16:39 +0900, Yukihiro M.
[email protected] writes:

|1.8e$B$Ge(BBACKREF($&, $1,…)e$B$,JQ?tL>$K$J$k$N$O0U?^E*$G$9!#e(B1.9e$B$Ge(B
|expressione$B$K$J$C$F$$$k$N$,0U?^E*$+$I$&$+$OJ,$+$j$^$;$s$,!“;de(B
|e$B$+$i$=$N$h$&$K$9$k$h$&$KMj$s$@$3$H$O$”$j$^$;$s!#e(B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’
p defined?($1) #=> “$1”

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:32340] Re: defined?($&)”
on Fri, 23 Nov 2007 11:39:21 +0900, SASADA Koichi [email protected]
writes:

|> e$B$"$^$j;H$o$l$F$J$$$H;W$&$N$GL5M}$K9g$o$;$kI,MW$O$J$$$H$O;W$$e(B
|> e$B$^$9$,!“JQ99$,Fq$7$/$J$$$N$G$”$l$Pe(B(e$B;d$K$O$I$3$rD>$;$P$h$$$Ne(B
|> e$B$+J,$+$j$^$;$s$G$7$?$,e(B)e$B$;$a$Fe(B"expression"e$B$G$O$J$/e(B
|> "global-variable"e$B$K$9$k$N$O$I$&$G$7$g$&$+!#e(B
|
|e$B!!e(B$& e$B$,e(B $& e$B$G!$e(B $~ e$B$,e(B gloval-variable e$B$J$N$O$J$s$G$G$7$g$&$+!%e(B$~ e$B$Oe(B
|NODE_GVAR e$B$@$+$i!$$H$$$&5$$,$7$^$9!%$$$C$=$N$3$H!$$I$A$i$be(B $&, $~ e$B$re(B
|e$BJV$9$H$+$I$&$G$7$g$&!%e(B

e$B<BAu$,$=$&$J$C$F$$$ke(B(NODEe$B$,0c$&e(B)e$B$N$,M}M3$G!"%f!<%6$K$O$=$s$Je(B
e$B$N4X78$J$$$+$i!“e(B1.8e$B$G$”$s$^$j0l4S$7$F$$$J$$$N$OG’$a$^$9!#e(B

e$B$G$b!"B7$($k$J$ie(Bglobal-variablee$B$GB7$($k$s$8$c$J$$$G$7$g$&$+!#e(B

In article E1IvOVO-0007zv-Nm@x31,
Yukihiro M. [email protected] writes:

e$B<BAu$,$=$&$J$C$F$$$ke(B(NODEe$B$,0c$&e(B)e$B$N$,M}M3$G!"%f!<%6$K$O$=$s$Je(B
e$B$N4X78$J$$$+$i!“e(B1.8e$B$G$”$s$^$j0l4S$7$F$$$J$$$N$OG’$a$^$9!#e(B

e$B$G$b!"B7$($k$J$ie(Bglobal-variablee$B$GB7$($k$s$8$c$J$$$G$7$g$&$+!#e(B

$& e$B$H$+$N5sF0$C$F%0%m!<%P%kJQ?t$8$c$"$j$^$;$s$h$M!#e(B

e$B$I$C$A$+$C$F$$$&$H%m!<%+%kJQ?t$J$s$8$c$J$$$G$9$+!#e(B

e$B!!$5$5$@$G$9!%e(B

Tanaka A. wrote:

e$B$I$C$A$+$C$F$$$&$H%m!<%+%kJQ?t$J$s$8$c$J$$$G$9$+!#e(B
e$B!!$=$l$r8@$&$H!$e(B$_
e$B$J$I$O$I$&$J$k!$$H$$$&OC$b=P$F$-$=$&$G$9!%e(B$! e$B$J$se(B
e$B$+$O%9%l%C%I%m!<%+%k$@$7!%e(B

e$B!!e(Bglobal_variable e$B$G$O!$e(B$
e$B$G;O$^$kJQ?t$N0lMw$,=P$F$-$^$9$M!%$3$N%ae(B
e$B%=%C%I$N0UL#$Oe(B global e$B$8$c$J$/$F!$e(B$
e$B$G;O$^$kJQ?t$J$N$+$J$!!$$H;W$C$Fe(B
e$B$^$7$?!%e(B

e$B!!$H$3$m$G!$e(B

/(a)/ =~ ‘a’
p global_variables

e$B$H$9$k$H!$e(B$& e$B$,e(B2e$B2s=P$F$-$^$7$?!%e(B

["$-v", “$stdout”, “$PROGRAM_NAME”, “$LOADED_FEATURES”, “$.”,
“$KCODE”, “$-d”, “$:”, “$FILENAME”, “$defout”, “$,”, “$", "$-a", "$VERBOSE", "$?", "$stdin", "$0", "$\"", "$\\", "$=", "$DEBUG", "$>", "$&", "$-F", "$$", "$-l", "$LOAD_PATH", "$-0", "$+", "$!", "$-w", "$stderr", "$~", "$;", "$SAFE", "$*", "$<", "$_", "$-K", "$-p", "$-I", "$-i", "$deferr", "$/", "$'", "$@", "$&", "$”, “$’”,
“$+”, “$1”, “$2”, “$3”, “$4”, “$5”, “$6”, “$7”, “$8”, “$9”]

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:32343] Re: defined?($&)”
on Fri, 23 Nov 2007 12:43:58 +0900, Tanaka A. [email protected]
writes:

|> e$B$G$b!“B7$($k$J$ie(Bglobal-variablee$B$GB7$($k$s$8$c$J$$$G$7$g$&$+!#e(B
|
|$& e$B$H$+$N5sF0$C$F%0%m!<%P%kJQ?t$8$c$”$j$^$;$s$h$M!#e(B
|e$B$I$C$A$+$C$F$$$&$H%m!<%+%kJQ?t$J$s$8$c$J$$$G$9$+!#e(B

e$B$=$&$$$&0UL#$G$OBg0hJQ?t$G$O$J$/FC<lJQ?t$H8F$V$Y$-$J$N$+$b$7e(B
e$B$l$^$;$s!#e(B$e$B$G$O$8$^$k$b$NA4Ite(B(CommonLispe$BN.!)e(B)e$B!#e(B

e$B!!$5$5$@$G$9!%e(B

e$B!!7k6I!$e(Bdefined? e$B$Ke(B $& e$B$de(B $1
e$B$rF~$l$?$H$-$NJVCM$O2?$K$7$^$7$g$&!%e(B
gloval-variable e$B$G$$$$$G$9$+!)e(B

In article E1IvQXN-00007J-Q3@x31,
Yukihiro M. [email protected] writes:

e$B$=$&$$$&0UL#$G$OBg0hJQ?t$G$O$J$/FC<lJQ?t$H8F$V$Y$-$J$N$+$b$7e(B
e$B$l$^$;$s!#e(B$e$B$G$O$8$^$k$b$NA4Ite(B(CommonLispe$BN.!)e(B)e$B!#e(B

e$BFC<lJQ?t$J$i$$$$$s$8$c$J$$$G$7$g$&$+!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:32372] Re: defined?($&)”
on Tue, 27 Nov 2007 11:21:08 +0900, SASADA Koichi [email protected]
writes:

|e$B!!7k6I!$e(Bdefined? e$B$Ke(B $& e$B$de(B $1 e$B$rF~$l$?$H$-$NJVCM$O2?$K$7$^$7$g$&!%e(B
|gloval-variable e$B$G$$$$$G$9$+!)e(B

global-variablee$B$G$*4j$$$7$^$9!#!VFC<lJQ?t!W$H$$$&8F$SL>$r$Ie(B
e$B$&07$&$+$OJL$G9M$($^$9!#e(B