[Bug #1534] Inconsistency Between Struct#to_s and Struct#inspect


#1

Bug #1534: Inconsistency Between Struct#to_s and Struct#inspect
http://redmine.ruby-lang.org/issues/show/1534

e$B5/I<<Te(B: ujihisa .
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
ruby -v: ruby 1.9.2dev (2009-05-28 trunk 23601) [i386-darwin9.7.0]

http://redmine.ruby-lang.org/issues/show/1427
http://redmine.ruby-lang.org/issues/show/1533
e$B$NFs$D$HF1$8LdBj$re(BStructe$B$GH/8+$7$^$7$?!#e(B
ruby
1.9e$B$G$ODL>oe(BStruct#to_se$B$He(BStruct#inspecte$B$OF1$8J8;zNs$rJV$7$^$9$,!"<+8J:F5"$9$k9=B$BN$KBP$7$F$O0[$J$k7k2L$rJV$7$F$$$^$9!#e(B

# ruby 1.9.2dev (2009-05-28 trunk 23601) [i386-darwin9.7.0]
t = Struct.new('A', :a).new(nil)
t.a = t
puts t.to_s
#=> <struct Struct::A a=#<struct Struct::A a=#<struct 

Struct::a:…>>>
puts t.inspect
#=> <struct Struct::A a=#>

e$BE:IU$N%Q%C%A$Ge(Bto_se$B$N7k2L$,e(Binspecte$B$HF1$8$K$J$j$^$9!#e(B

e$B$J$!";w$?$h$&$J<BAu$r$7$F$$$k$b$N$,$J$$$+e(Bgrepe$B$7$?$H$3$me(B,
proc.c, time.c,
ext/dl/cfunc.ce$B$,3:Ev$7$^$7$?!#$,!"$3$l$i$O<+8J:F5"E
9=B$$r;}$AF@$J$$$?$aBg>fIW$H;W$$$^$9!#e(B


#2

e$B%A%1%C%He(B #1534 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 r23606.

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