зеркало из https://github.com/github/ruby.git
follow change of observer.rb. fixed [ruby-core:6796]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
5a6ed851fe
Коммит
e5857628fc
|
@ -1,3 +1,8 @@
|
|||
Tue Nov 29 22:45:30 2005 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
|
||||
|
||||
* lib/drb/observer.rb (notify_observers): follow change of observer.rb.
|
||||
fixed: [ruby-core:6796]
|
||||
|
||||
Mon Nov 28 20:24:22 2005 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* lib/pp.rb (PP::PPMethods#object_address_group): adjust address format.
|
||||
|
|
|
@ -6,16 +6,17 @@ module DRb
|
|||
|
||||
def notify_observers(*arg)
|
||||
if defined? @observer_state and @observer_state
|
||||
if defined? @observer_peers
|
||||
for i in @observer_peers.dup
|
||||
begin
|
||||
i.update(*arg)
|
||||
rescue
|
||||
delete_observer(i)
|
||||
end
|
||||
end
|
||||
end
|
||||
@observer_state = false
|
||||
if defined? @observer_peers
|
||||
@observer_peers.delete_if do |k, v|
|
||||
begin
|
||||
k.send(v, *arg)
|
||||
false
|
||||
rescue
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
@observer_state = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче