Array#[]=(pos, length, val) and Array#[]=(range, val)

e$B$3$s$K$A$O!"e(Bsheepman e$B$G$9!#e(B

e$BKhEY$N$3$H$G$9$,!"%j%U%!%l%s%9$rJT=8$7$F$$$F5$$K$J$C$?$3$H$G$9!#e(B
Array#[]=(pos, length, val) e$B$Ne(B length e$B$Ke(B 0
e$B$r;XDj$7$?>l9g!“e(B
pos e$B$ND>A0$Ke(B val e$B$,A^F~$5$l$k$H$$$&$N$O!”;EMM$G$9$h$M!#e(B

http://www.ruby-lang.org/ja/man/index.cgi?cmd=view;name=Array#self.5bstart.2c.20length.5d.3dval

e$B$K$OL@<(E*$K=q$+$l$F$$$^$;$s$,!"e(B

http://doc.loveruby.net/refm/api/view/method/Array/i/=5b=5d=3d

e$B$K$O$=$N$h$&$K=q$-$^$7$?!#e(B

e$B$"$H$3$l$O;EMM$J$N$+J,$+$i$J$$$N$G$9$,!“e(B
Array#[]=(range, val) e$B$Ne(B range e$B$Ne(B first e$B$,e(B end
e$B$h$j$b8e$K$”$k>l9g!"e(B
val e$B$,e(B first e$B$ND>A0$KA^F~$5$l$k$N$O;EMM$J$N$G$7$g$&$+!#e(B

$ cat t.rb
a = [0, 1, 2, 3]
a[2…0] = [‘a’, ‘b’]
p a

$ ruby-1.8 -v t.rb
ruby 1.8.6 (2007-06-18 patchlevel 5000) [i686-linux]
[0, 1, “a”, “b”, 2, 3]

http://doc.loveruby.net/refm/api/view/method/Array/i/=5b=5d=3d

e$B$K$O$=$N$h$&$K=q$-$^$7$?!#e(B