|
Revision 532, 494 bytes
(checked in by nahi, 7 years ago)
|
Added some tests.
|
- Property svn:eol-style set to
native
- Property svn:executable set to
*
- Property svn:keywords set to
author date id revision
|
| Line | |
|---|
| 1 |
require 'soap/marshal' |
|---|
| 2 |
|
|---|
| 3 |
Foo1 = Struct.new( "Foo1", :m ) |
|---|
| 4 |
Foo2 = Struct.new( :m ) |
|---|
| 5 |
class Foo3 |
|---|
| 6 |
attr_accessor :m |
|---|
| 7 |
end |
|---|
| 8 |
|
|---|
| 9 |
puts SOAP::Marshal.marshal( Foo1.new ) |
|---|
| 10 |
puts SOAP::Marshal.marshal( Foo2.new ) |
|---|
| 11 |
puts SOAP::Marshal.marshal( Foo3.new ) |
|---|
| 12 |
|
|---|
| 13 |
p SOAP::Marshal.unmarshal( SOAP::Marshal.marshal( Foo1.new )) |
|---|
| 14 |
# => #<Struct::Foo1 m=nil> |
|---|
| 15 |
p SOAP::Marshal.unmarshal( SOAP::Marshal.marshal( Foo2.new )) |
|---|
| 16 |
# => #<Foo2 m=nil> |
|---|
| 17 |
p SOAP::Marshal.unmarshal( SOAP::Marshal.marshal( Foo3.new )) |
|---|
| 18 |
# => #<Foo3:0xa033fc0> |
|---|