* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git] / lib / drb / observer.rb
blobe7f1668c52605e2bbec919a7075ff77deabbf84f
1 require 'observer'
3 module DRb
4   module DRbObservable
5     include Observable
7     def notify_observers(*arg)
8       if defined? @observer_state and @observer_state
9         if defined? @observer_peers
10           for i in @observer_peers.dup
11             begin
12               i.update(*arg)
13             rescue
14               delete_observer(i)
15             end
16           end
17         end
18         @observer_state = false
19       end
20     end
21   end
22 end