DRb and DRbUndumped only for one method?

V

Ville Mattila

Hello,

Is it possible to make only one method of a class undumpable? I.e
something like
Class Foo
def bar
end
def foobar
include(DRbMethodUndumped)
end
end

- Ville
 
E

Eric Hodel

--Apple-Mail-3--265915346
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

Hello,

Is it possible to make only one method of a class undumpable?
No...

I.e
something like
Class Foo
def bar
end
def foobar
include(DRbMethodUndumped)
end
end

Only objects can be undumpable, not methods. You *can* make the object
that is returned by a method undumpable:

class X
def meth
obj = do_stuff
obj.include DRbUndumped
return obj
end
end

--
Eric Hodel - (e-mail address removed) - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04

--Apple-Mail-3--265915346
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFB+c5AMypVHHlsnwQRAnoyAKDcisLmKrgE1RFUPulYLW5rsIc3dgCg4VWM
oNDYCkDRFEJBM9f+jTXVZIk=
=Pvc3
-----END PGP SIGNATURE-----

--Apple-Mail-3--265915346--
 
V

Ville Mattila

Eric Hodel said:
....

Only objects can be undumpable, not methods. You *can* make the object
that is returned by a method undumpable:

class X
def meth
obj = do_stuff
obj.include DRbUndumped
return obj
end
end

Ah! Of course. Except you have to use obj.extend.
Thanks for your guidance Eric.

- Ville
 
E

Eric Hodel

--Apple-Mail-9--210408864
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed


Ah! Of course. Except you have to use obj.extend.
Thanks for your guidance Eric.

Doh! I typed exactly 'extend' when testing...

--
Eric Hodel - (e-mail address removed) - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04

--Apple-Mail-9--210408864
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFB+qcXMypVHHlsnwQRAu1BAJ9dErXA2xOQJrh5gnS8/UKiWLDULgCgrUDP
g2XKnTBWtoF3Hjktv+F8XDk=
=cDef
-----END PGP SIGNATURE-----

--Apple-Mail-9--210408864--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top