Ruby Forum Ruby-core > Struct::new

Posted by ts (Guest)
on 03.05.2008 15:22
(Received via mailing list)
Struct::new call twice #to_str when it's defined

vgs% ./ruby -ve'class A; def to_str() puts "to_str"; "Str" end end; 
Struct.new(A.new)'
ruby 1.8.7 (2008-05-02 patchlevel 5000) [i686-linux]
to_str
to_str
vgs%


p.s.: 1.9 do something stupid but it's (*partially*) in
test_knownbug.rb


Guy Decoux