Feature of recursive Array#join


#1

Yuguie$B$G$9!#e(B

e$B<+8J:F5"$9$kG[Ns$KBP$9$ke(Bjoine$B$N7k2L$,e(B1.8e$B$He(B1.9e$B$G0[$J$j$^$9$,!"$3$l$O;EMM$Ge(B
e$B$7$g$&$+!#$^$?!“e(B1.8e$B$K$7$F$b7+$jJV$7$NMM;R$,e(Binspecte$B$H$O0[$J$j$^$9$,!”$3$le(B
e$B$O;EMM$G$7$g$&$+!#e(B

% cat test.rb
x = [[1,2],[3,4]]
x << x
puts x.inspect
puts x.join(’:’)

% ruby -v test.rb
ruby 1.8.7 (2008-08-11 patchlevel 72)
[i686-darwin9]
[[1, 2], [3, 4], […]]
1:2:3:4:1:2:3:4:[…]

% ruby-1.9.1 -v test.rb
ruby 1.9.1 (2008-10-31)
[i386-darwin9.5.0]
[[1, 2], [3, 4], […]]
1:2:3:4:[…]:[…]:[…]


#2

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

In message “Re: [ruby-dev:37019] feature of recursive Array#join”
on Mon, 3 Nov 2008 12:10:17 +0900, “Yugui (Yuki S.)”
removed_email_address@domain.invalid writes:

|e$B<+8J:F5"$9$kG[Ns$KBP$9$ke(Bjoine$B$N7k2L$,e(B1.8e$B$He(B1.9e$B$G0[$J$j$^$9$,!"$3$l$O;EMM$Ge(B
|e$B$7$g$&$+!#$^$?!“e(B1.8e$B$K$7$F$b7+$jJV$7$NMM;R$,e(Binspecte$B$H$O0[$J$j$^$9$,!”$3$le(B
|e$B$O;EMM$G$7$g$&$+!#e(B

e$B<+8J:F5"$9$kG[Ns$KBP$9$k?6$kIq$$$O=hM}7O0MB8$@$H9M$($^$9!#e(B
e$B$,!"e(B1.8e$B$He(B1.9e$B$N0c$$$K$D$$$F$OD4$Y$F$_$^$9!#e(B