[][1,&nil] = 2


#1

e$B0J2<$N$h$&$Ke(B [][1,&nil] = 2 e$B$H$9$k$H!"e(Bnil e$B$Ke(B []=
e$B$,$J$$$H$$e(B
e$B$&%(%i!<$K$J$k$N$O0U?^$;$6$k$b$N$G$O$J$$$G$7$g$&$+!#e(B

% ./ruby -ve ‘[][1,&nil] = 2’
ruby 1.9.0 (2007-06-29 patchlevel 0) [i686-linux]
-e:1:in method_missing': undefined method[]=’ for nil:NilClass
(NoMethodError)
from -e:1:in `’


#2

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

Tanaka A. wrote:

e$B0J2<$N$h$&$Ke(B [][1,&nil] = 2 e$B$H$9$k$H!"e(Bnil e$B$Ke(B []= e$B$,$J$$$H$$e(B
e$B$&%(%i!<$K$J$k$N$O0U?^$;$6$k$b$N$G$O$J$$$G$7$g$&$+!#e(B

% ./ruby -ve ‘[][1,&nil] = 2’
ruby 1.9.0 (2007-06-29 patchlevel 0) [i686-linux]
-e:1:in method_missing': undefined method[]=’ for nil:NilClass (NoMethodError)
from -e:1:in `’

e$B!!$3$l$O!“B?J,%Q!<%5%(%i!<$+%3%s%Q%$%k%(%i!<$K$J$k$Y$-$@$H;W$&e(B
e$B$N$G$9$,!J0c$$$^$9!)!K!”$I$&$7$^$7$g$&!d$^$D$b$H$5$se(B


#3

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

Yukihiro M. wrote:

|e$B!!$3$l$O!“B?J,%Q!<%5%(%i!<$+%3%s%Q%$%k%(%i!<$K$J$k$Y$-$@$H;W$&e(B
|e$B$N$G$9$,!J0c$$$^$9!)!K!”$I$&$7$^$7$g$&!d$^$D$b$H$5$se(B

e$B$=$&$J$s$G$9$+!)e(B

[]e$B$H$$$&%%V%8%’%/%H$Ne(B[]=e$B$H$$$&%a%=%C%I$,0z?te(B(1,2)e$B$G%V%m%C%/e(B
e$BIU$-e(B(e$B$^!“e(Bnile$B$@$1$Ie(B)e$B$G8F$P$l$F$$$k$H2r<a$G$-$k$s$G!”$3$l$r%3%se(B
e$B%Q%$%k%(%i!<$K$9$kM}M3$O$J$$$h$&$K;W$&$N$G$9$,!#@8@.$7$F$$$ke(B
e$B%N!<%I$,$
$+$7$$$H$$$&$3$H$O$"$k$+$b$7$l$^$;$s!#e(B

e$B!!$"$"!“0U?^E*$G$7$?$i$$$$$G$9!#@Q6KE*$K!V%(%i!<$K$9$k$Y$-!W$He(B
e$B$$$&:,5r$O$”$j$^$;$s!#e(B

e$B!!$8$c$!!"F0$/$h$&$KBP1~$7$F$*$-$^$9!#e(B


#4

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

In message “Re: [ruby-dev:31112] Re: [][1,&nil] = 2”
on Mon, 2 Jul 2007 22:49:22 +0900, SASADA Koichi removed_email_address@domain.invalid
writes:

|Tanaka A. wrote:
|> e$B0J2<$N$h$&$Ke(B [][1,&nil] = 2 e$B$H$9$k$H!"e(Bnil e$B$Ke(B []= e$B$,$J$$$H$$e(B
|> e$B$&%(%i!<$K$J$k$N$O0U?^$;$6$k$b$N$G$O$J$$$G$7$g$&$+!#e(B
|>
|> % ./ruby -ve ‘[][1,&nil] = 2’
|> ruby 1.9.0 (2007-06-29 patchlevel 0) [i686-linux]
|> -e:1:in method_missing': undefined method[]=’ for nil:NilClass (NoMethodError)
|> from -e:1:in `’
|
|e$B!!$3$l$O!“B?J,%Q!<%5%(%i!<$+%3%s%Q%$%k%(%i!<$K$J$k$Y$-$@$H;W$&e(B
|e$B$N$G$9$,!J0c$$$^$9!)!K!”$I$&$7$^$7$g$&!d$^$D$b$H$5$se(B

e$B$=$&$J$s$G$9$+!)e(B

[]e$B$H$$$&%%V%8%’%/%H$Ne(B[]=e$B$H$$$&%a%=%C%I$,0z?te(B(1,2)e$B$G%V%m%C%/e(B
e$BIU$-e(B(e$B$^!“e(Bnile$B$@$1$Ie(B)e$B$G8F$P$l$F$$$k$H2r<a$G$-$k$s$G!”$3$l$r%3%se(B
e$B%Q%$%k%(%i!<$K$9$kM}M3$O$J$$$h$&$K;W$&$N$G$9$,!#@8@.$7$F$$$ke(B
e$B%N!<%I$,$
$+$7$$$H$$$&$3$H$O$"$k$+$b$7$l$^$;$s!#e(B