From: Hal Fulton Date: 2006-02-12T01:26:57+09:00 Subject: Re: OpenStruct problem Minkoo Seo wrote: > > That being said, what's the benefit of OpenStruct? If OpenStruct > is nothing but a hashtable with syntactic sugar, I see reason > of using it. Am I missing something? > Well, I talked to the author once (on this list -- you could look it up) and he said something like, "OpenStruct was only a toy, I am surprised people use it so much." The file says Matz wrote it, although I thought it was someone else. My memory is faulty. My impression is that it was thrown together as a little proof- of-concept and was not meant as a serious tool. Have you ever looked at the code? It's instructive if you haven't. Once you strip out the comments, it's only about 77 lines. You might consider my SuperStruct class [1] -- I think it has bugs, so let me know if you find them. And it doesn't reimplement eql? so you may still have a problem there. Cheers, Hal [1] http://sstruct/rubyforge.org