On Thu, Aug 21, 2008 at 10:56 AM, Robert Klemme
<shortcutter / googlemail.com> wrote:
> On 21.08.2008 17:46, Michael Libby wrote:

>> File.open("saved.m", "w"){|f| f.puts(Marshal.dump(hsh)) }
>
> I'd rather do
>
> File.open("saved.m", "wb"){|f| Marshal.dump(hsh, f) }

[snip]

>>> str = (File.open("saved.m").read)
>>
>> This works, but is more readable as.
>>
>> str = File.read("saved.m")
>
> Again, rather
>
> str = File.open("saved.m","rb") {|f| Marshal.load(f)}

Good suggestions.

 -Michael