Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.37
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby19 /
share /
ri /
1.9.1 /
system /
Marshal /
Delete
Unzip
Name
Size
Permission
Date
Action
cdesc-Marshal.ri
4.01
KB
-rw-r--r--
2023-07-26 17:26
dump-c.ri
1.4
KB
-rw-r--r--
2023-07-26 17:26
load-c.ri
564
B
-rw-r--r--
2023-07-26 17:26
restore-c.ri
570
B
-rw-r--r--
2023-07-26 17:26
Save
Rename
U:RDoc::NormalModule[iI"Marshal:ET@0o:RDoc::Markup::Document:@parts[o;;[%o:RDoc::Markup::Paragraph;[ I"GThe marshaling library converts collections of Ruby objects into a;TI"Bbyte stream, allowing them to be stored outside the currently;TI"Gactive script. This data may subsequently be read and the original;TI"objects reconstituted.;To:RDoc::Markup::BlankLine o; ;[ I"DMarshaled data has major and minor version numbers stored along;TI"Dwith the object information. In normal use, marshaling can only;TI"Fload data written with the same major version number and an equal;TI"Eor lower minor version number. If Ruby's ``verbose'' flag is set;TI"B(normally using -d, -v, -w, or --verbose) the major and minor;TI"Enumbers must match exactly. Marshal versioning is independent of;TI"GRuby's version numbers. You can extract the version by reading the;TI"'first two bytes of marshaled data.;T@o:RDoc::Markup::Verbatim;[ I"!str = Marshal.dump("thing") ;FI" RUBY_VERSION #=> "1.9.0" ;FI"str[0].ord #=> 4 ;FI"str[1].ord #=> 8 ;Fo; ;[I"GSome objects cannot be dumped: if the objects to be dumped include;TI"Ebindings, procedure or method objects, instances of class IO, or;TI"3singleton objects, a TypeError will be raised.;T@o; ;[ I"GIf your class has special serialization needs (for example, if you;TI"Bwant to serialize in some specific format), or if it contains;TI"Hobjects that would otherwise not be serializable, you can implement;TI"%your own serialization strategy.;T@o; ;[ I"GThere are two methods of doing this, your object can define either;TI"Nmarshal_dump and marshal_load or _dump and _load. marshal_dump will take;TI"Kprecedence over _dump if both are defined. marshal_dump may result in;TI"smaller Marshal strings.;T@S:RDoc::Markup::Heading: leveli: textI""marshal_dump and marshal_load;T@o; ;[I"CWhen dumping an object the method marshal_dump will be called.;TI"Omarshal_dump must return a result containing the information necessary for;TI"Lmarshal_load to reconstitute the object. The result can be any object.;T@o; ;[I"IWhen loading an object dumped using marshal_dump the object is first;TI"Mallocated then marshal_load is called with the result from marshal_dump.;TI"Nmarshal_load must recreate the object from the information in the result.;T@o; ;[I" Example:;T@o;;[I"class MyObj ;FI"* def initialize name, version, data ;FI" @name = name ;FI" @version = version ;FI" @data = data ;FI" end ;FI" ;FI" def marshal_dump ;FI" [@name, @version] ;FI" end ;FI" ;FI" def marshal_load array ;FI"! @name, @version = array ;FI" end ;FI" end ;FS;; i;I"_dump and _load;T@o; ;[I"NUse _dump and _load when you need to allocate the object you're restoring;TI"yourself.;T@o; ;[ I"OWhen dumping an object the instance method _dump is called with an Integer;TI"Pwhich indicates the maximum depth of objects to dump (a value of -1 implies;TI"Ithat you should disable depth checking). _dump must return a String;TI"Econtaining the information necessary to reconstitute the object.;T@o; ;[I"OThe class method _load should take a String and use it to return an object;TI"of the same class.;T@o; ;[I" Example:;T@o;;[I"class MyObj ;FI"* def initialize name, version, data ;FI" @name = name ;FI" @version = version ;FI" @data = data ;FI" end ;FI" ;FI" def _dump level ;FI"$ [@name, @version].join ':' ;FI" end ;FI" ;FI" def self._load args ;FI" new(*args.split(':')) ;FI" end ;FI" end ;Fo; ;[I"LSince Marhsal.dump outputs a string you can have _dump return a Marshal;TI"Astring which is Marshal.loaded in _load for complex objects.;T: @fileI"marshal.c;T;0[ [[I"MAJOR_VERSION;To;;[ ;0@|[I"MINOR_VERSION;To;;[ ;0@|[ [[I" class;F[[:public[[I" dump;T@|[I" load;T@|[I"restore;T@|[:protected[ [:private[ [I" instance;F[[;[ [;[ [;[