From: Tom Copeland Date: 2006-05-19T05:52:45+09:00 Subject: Re: [ ruby-Bugs-4457 ] Strange interactions between Struct and 'pp' On Sat, 2006-05-13 at 16:39 +0900, Tanaka Akira wrote: > In article <200605121513.k4CFDWsl029144@rubyforge.org>, > noreply@rubyforge.org writes: > > >> ruby -rpp -e 'pp Struct.new(:members).new' > > /usr/lib/ruby/1.8/pp.rb:181:in `__send__': undefined method `each' for nil:NilClass (NoMethodError) > > Thank you for the report. > > I fixed the problem. I also received an additional note from Gustav Munkby, who reported the bug. He asked me to post it here: ================ It might however also be nice to document explicitly for the Struct class that the built-in methods are overridden by the accessor functions. If I use a Struct this is clearly what I would expect, but to prevent others that want to iterate over the Struct members for instance to perform the same mistake. ================ Yours, Tom