Something Confusing

Hello Dear Ruby-Users,

there is something confusing about the methods .dump, .load and .restore
within the Marshalling-Routines:

The Documentations says that with .dump a class could be stored on disk and
with .load it could be used as .new to create an object, but this is not
correct, only with the .restore method a new object could be created.

I tested this with ruby version 1.6.8 and 1.8.0 both same results.

Please check the routines.

Greeting
Carsten Heine
< feno7@gmx.de >

···


+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!

marshal.c:

rb_define_module_function(rb_mMarshal, "load", marshal_load, -1);
rb_define_module_function(rb_mMarshal, "restore", marshal_load, -1);

If one works, the other should. They are synonyms.

···

On Fri, Mar 21, 2003 at 07:06:44AM +0900, feno7@gmx.de wrote:

Hello Dear Ruby-Users,

there is something confusing about the methods .dump, .load and .restore
within the Marshalling-Routines:

The Documentations says that with .dump a class could be stored on disk and
with .load it could be used as .new to create an object, but this is not
correct, only with the .restore method a new object could be created.

I tested this with ruby version 1.6.8 and 1.8.0 both same results.


_ _

__ __ | | ___ _ __ ___ __ _ _ __
'_ \ / | __/ __| '_ _ \ / ` | ’ \
) | (| | |
__ \ | | | | | (| | | | |
.__/ _,
|_|/| || ||_,|| |_|
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

‘Ooohh… “FreeBSD is faster over loopback, when compared to Linux
over the wire”. Film at 11.’
– Linus Torvalds

I don’t understand what you are saying, please can you post an example which
demonstrates the problem?

‘restore’ is just a synonym for ‘load’, according to the Pickaxe book.

Regards,

Brian.

···

On Fri, Mar 21, 2003 at 07:06:44AM +0900, feno7@gmx.de wrote:

Hello Dear Ruby-Users,

there is something confusing about the methods .dump, .load and .restore
within the Marshalling-Routines:

The Documentations says that with .dump a class could be stored on disk and
with .load it could be used as .new to create an object, but this is not
correct, only with the .restore method a new object could be created.

I tested this with ruby version 1.6.8 and 1.8.0 both same results.