From: Masatoshi SEKI Date: 2003-01-12T13:08:03+09:00 Subject: Re: drb bug? Hi, Joel. On 2003.1.12, at 11:14 AM, Joel VanderWerf wrote: > The code I just posted on the client/server observer thread[1] seems > to expose a drb or ruby bug. It runs fine for about 20-30 seconds, and > then: I think, its blocks were GCed. Application should hold reference of Proc object. [http://ruby-talk.org/blade/61263] | ========= client.rb ======= | | require 'drb' | DRb.start_service() | server = DRbObject.new(nil, 'druby://localhost:9500') | | (0..9).each do |i| | server.register 100*i + i do |val| puts val end ===================== Proc object | end | | sleep for example ... # sorry, it is untested. block = Proc.new { |val| puts val } (0..9).each do |i| server.register(100*i + 1, &block) end