[Bug #1427] Difference between Array#to_s and Array#inspect


#1

Bug #1427: Difference between Array#to_s and Array#inspect
http://redmine.ruby-lang.org/issues/show/1427

e$B5/I<<Te(B: ujihisa .
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Low
e$B%+%F%4%je(B: core, Target version: 1.9.2
ruby -v: ruby 1.9.2dev (2009-04-30 trunk 23312) [i386-darwin9.6.0]

ruby
1.9e$B$G$ODL>oe(BArray#to_se$B$He(BArray#inspecte$B$OF1$8J8;zNs$rJV$7$^$9$,!"<+8J:F5"$9$kG[Ns$KBP$7$F$O0[$J$k7k2L$rJV$7$F$$$^$9!#e(B

ruby 1.9.2dev (2009-04-30 trunk 23312) [i386-darwin9.6.0]

a = [1]
a << a
a.inspect #=> [1, […]]
a.to_s #=>[1, [1, […]]]

rb_exec_recursivee$B$Ne(Brecursive_checke$B$G!“e(BArray#inspecte$B$Oe(Binspect
-> inspecte$B$H=hM}$,?J$s$G:F5”$rH=Dj$7$^$9$,!"e(BArray#to_se$B$Oe(Bto_s
-> inspect ->
inspecte$B$H=hM}$,?J$s$GH=Dj$9$k$?$a!"8e<T$NJ}$,0l2sB?$/e(Brb_ary_inspecte$B$r8F$S=P$7$F$$$^$9!#e(B

to_se$B$re(Binspecte$B$Ne(Baliase$B$K$9$k%Q%C%A$rE:IU$7$^$9!#e(B


#2

e$B%A%1%C%He(B #1427 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r23324.

http://redmine.ruby-lang.org/issues/show/1427