Bugs item #2892, was opened at 2005-11-28 21:38
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=2892&group_id=426

Category: Standard Library
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Yuri Kozlov (yko)
Assigned to: Nobody (None)
Summary: [PATCH] DRbObservable in the CVS-HEAD is not work

Initial Comment:
server
---
require 'drb/drb'
require 'drb/observer'
class TestServer
  include DRb::DRbObservable
  def update
    puts 'Sending update'
    changed
    notify_observers('La La')
    puts 'Done'
  end
end
server = TestServer.new
DRb.start_service('druby://localhost:9000', server)
DRb.thread.join

client
---
require 'drb/drb'
class MyClass
  include DRb::DRbUndumped
  def initialize(o)
    o.add_observer(self)
  end
  def update(str)
    puts "YES -   -   #{str}"
  end
end
DRb.start_service()
obj = DRbObject.new(nil, 'druby://localhost:9000')
my = MyClass.new(obj)
obj.update
DRb.thread.join

CVS version return (if insert the debug point after rescue)
undefined method `update' for #<Values:0xb7a59df8>
and delete observer.

This happen because the code of parent class observer was changed, but drb/observer no.
This patch just copy part of the original notify_observer to the drb/observer.


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=2892&group_id=426