From: Mike Harris Date: 2006-07-29T04:02:50+09:00 Subject: Re: Mongoose 0.2.5 - The "Two Steps Forward, One Step Back" release Jamey Cribbs wrote: > Mike Harris wrote: > >>> >> Yup, when you add the b flag, it works (mostly) >> >> obj.foo = (1..9).to_a still doesn't work. When you try and read it >> back, you get 1 (a Fixnum). >> >> obj.foo = Marshal.dump((1..9).to_a) does work. Obviously you have to >> Marshal.load on retrieval, but it works. >> Awesome. >> I'm going to add an :object type and transparent-ize the marshalling. >> > > Did you get the email I sent to you directly? I attached a test > version of Mongoose that added a new data type called :undefined > (although I like :object better). > > Jamey > > Confidentiality Notice: This email message, including any attachments, > is for the sole use of the intended recipient(s) and may contain > confidential and/or privileged information. If you are not the > intended recipient(s), you are hereby notified that any dissemination, > unauthorized review, use, disclosure or distribution of this email and > any materials contained in any attachments is prohibited. If you > receive this message in error, or are not the intended recipient(s), > please immediately notify the sender by email and destroy all copies > of the original message, including attachments. > > I'll check out your e-mail, per our conversation off-list. When you replace the flatten call with a flatten_top call, everything works transparently, like you predicted before. My "implementation" of flatten_top: class Array def flatten_top inject([]) { |s,i| s.concat(i) } end end