On Wed, Jul 20, 2005 at 12:34:07PM +0900, Mark Volkmann wrote:
> I've been reading about DRb from several sources including the
> documentation at the beginning of drb.rb. I'm troubled by the
> mechanism for passing objects by reference instead of by value. From
> what I've read you have to add "include DRb::DRbUndumped" to the class
> of the objects being passed. What if I want to pass some objects of
> that type by reference and others by value?

See if the explanation here makes any sense:
http://www.rubygarden.org/ruby?DrbTutorial

And then if you don't know about singleton classes, read here:
http://www.rubygarden.org/ruby?SingletonTutorial

Then you should be able to see that

  a = Foo.new
  b = Foo.new
  a.extend Drb::DRbUndumped

will result in 'a' being passed by reference, and 'b' by value.

HTH,

Brian.