DRb and DRbUndumped only for one method?

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

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

PGP.sig (186 Bytes)

···

On 27 Jan 2005, at 02:10, Ville Mattila wrote:

--
Eric Hodel - drbrain@segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04

Eric Hodel <drbrain@segment7.net> writes:

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

No...

....

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

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

PGP.sig (186 Bytes)

···

On 27 Jan 2005, at 23:00, Ville Mattila wrote:

Eric Hodel <drbrain@segment7.net> writes:

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.

--
Eric Hodel - drbrain@segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04