Drb question

i never really seem to do more that play with drb and then forget everything,
nonetheless this perplexes me:

   ~ > cat a.rb
   require 'drb/drb'
   mode = ARGV.shift || 'server'

   case mode
     when 'server'
       a = ['foobar']
       DRb.start_service nil, a
       uri = DRb.uri
       puts "ruby #{ $0 } client #{ DRb.uri }"
       DRb.thread.join
     when 'client'
       uri = ARGV.shift
       DRb.start_service nil, nil
       a = DRbObject.new nil, uri
       p a.size
       p a.unshift
   end

   ~ > ruby a.rb server
   ruby a.rb client druby://fortytwo.merseine.nu:1241

   ~ > ruby a.rb client druby://fortytwo.merseine.nu:1241
   1
   ["foobar"]

   ~ > ruby a.rb client druby://fortytwo.merseine.nu:1241
   1
   ["foobar"]

it appears that unshift returns the entire array in this case? what it this?
slap me if this is a stupid question.

thanks.

-a

···

--

EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
A flower falls, even though we love it; and a weed grows, even though we do
not love it. --Dogen

===============================================================================

i am an idiot. please ignore - composed this late last night and hit send
this morning w/o a review. sorry.

i never really seem to do more that play with drb and then forget everything,
nonetheless this perplexes me:

~ > cat a.rb
require 'drb/drb'
mode = ARGV.shift || 'server'

case mode
   when 'server'
     a = ['foobar']
     DRb.start_service nil, a
     uri = DRb.uri
     puts "ruby #{ $0 } client #{ DRb.uri }"
     DRb.thread.join
   when 'client'
     uri = ARGV.shift
     DRb.start_service nil, nil
     a = DRbObject.new nil, uri
     p a.size
     p a.unshift
end

~ > ruby a.rb server
ruby a.rb client druby://fortytwo.merseine.nu:1241

~ > ruby a.rb client druby://fortytwo.merseine.nu:1241
1
["foobar"]

~ > ruby a.rb client druby://fortytwo.merseine.nu:1241
1
["foobar"]

it appears that unshift returns the entire array in this case? what it this?
slap me if this is a stupid question.

thanks.

-a
--

> EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
> PHONE :: 303.497.6469
> A flower falls, even though we love it; and a weed grows, even though we do
> not love it. --Dogen

-a

···

On Thu, 10 Jun 2004, Ara.T.Howard wrote:
--

EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
A flower falls, even though we love it; and a weed grows, even though we do
not love it. --Dogen

===============================================================================