From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2001-12-06T13:51:45+09:00 Subject: [ruby-talk:27602] Sending a Proc to a remote dRuby object I'm trying to send a proc to a dRuby object running on a remote machine and then call that proc... Here's what I'm got on the 'server' (the remote machine): #---------------------REMOTE----------------------------- class TestServer def run(&procObj) puts "got a: #{procObj.type}" procObj.call end end require "drb/drb" ts = TestServer.new primary = DRb::DRbServer.new("druby://localhost:5555", ts) puts "TestServer started" primary.thread.join #--------------------------------------------------------- And here's what I'm running on the local machine: # ----------- local ------------ require "drb/drb" primary = DRb::DRbServer.new ts = DRb::DRbObject.new(nil, ARGV.shift) #try sending a proc: ts.run { puts "running the Proc" } #--------------------------------- On the remote machine I get: =>TestServer started =>got a: Proc So it gets the Proc, but the call of the Proc seems to do nothing... (I would expect to see on the remote machine: "running a Proc" in addition to the above). Is it even possible to pass a Proc to a remote dRuby object like this? Phil