From: Alex Polite Date: 2006-05-25T14:51:52+09:00 Subject: Re: Marshaling NArray objects. On 5/25/06, Joel VanderWerf wrote: > This seems to work as a replace method: > > a[] = b[] > =============== 1 require 'narray' 2 class NArray 3 def marshal_dump 4 self.to_a 5 end 6 7 def marshal_load(array) 8 newnarray = NArray.to_narray(array) 9 self[] = newnarray[] 10 end 11 end 12 13 na = NArray.float(10) 14 15 Marshal.load(Marshal.dump(na)) =============== Results in marshaling_narrays.rb:9:in `[]=': wrong argument type NArray (expected Data) (TypeError) from marshaling_narrays.rb:9:in `marshal_load' from marshaling_narrays.rb:15 -- Alex Polite http://flosspick.org - finding the right open source