Re: Trouble with Marshal

From: Gavin K.

It took less time than I thought to bring it down to a simple,
reproducible, moderately sanitized case:

Bah…this time manually wrapped to less than 70 characters in the hope
that it will survive intact:

p VERSION, PLATFORM
#=> “1.8.5”
#=> “i386-mswin32”

s1 = “Change 35573 by fred.joomblie@PD133 on 2006/09/26 11:58:21” +
“\n\n\tClear scene method to empty the XXXX display on File” +
“->New\n\nAffected files …\n\n… //Dev03/Main/AnarkCore/” +
“Cxxxxxxxxxxxxxxxxx/Cxxxxxxxx.cs#47 edit\n… //Dev03/Main/” +
“AnarkCore/Renderxxxx/Scenexxxx.cpp#6 edit\n… //Dev03/” +
“Main/AnarkCore/Renderxxxx/Scenexxxx.h#7 edit\n… //Dev03” +
“/Main/AnarkCore/RenderxxxxUnitTest/RenderxxxxTestRunner.cs” +
#7 edit\n… //Dev03/Main/AnarkCore/RenderToolkit/” +
“Interfaces/IScene.cs#8 edit\n… //Dev03/Main/AnarkCore/” +
“RenderToolkit/RenderController.cs#7 edit\n\n”

File.open( ‘desc.marshal’, ‘wb+’ ){ |f| f << Marshal.dump( s1 ) }

p s2 = Marshal.load( IO.read( ‘desc.marshal’ ) )

#=> foo.rb:13:in `load’: marshal data too short (ArgumentError)