* lib/monitor.rb: use Object#__send__ instead of Object#send.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shugo 2003-12-04 04:25:10 +00:00
Родитель 541df88924
Коммит 7072d8279d
2 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Thu Dec 4 13:24:13 2003 Shugo Maeda <shugo@ruby-lang.org>
* lib/monitor.rb: use Object#__send__ instead of Object#send.
Thu Dec 4 13:17:45 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org> Thu Dec 4 13:17:45 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* lib/soap/streamHandler.rb: support latest released version of * lib/soap/streamHandler.rb: support latest released version of

Просмотреть файл

@ -87,11 +87,11 @@ module MonitorMixin
class Timeout < Exception; end class Timeout < Exception; end
def wait(timeout = nil) def wait(timeout = nil)
@monitor.send(:mon_check_owner) @monitor.__send__(:mon_check_owner)
timer = create_timer(timeout) timer = create_timer(timeout)
Thread.critical = true Thread.critical = true
count = @monitor.send(:mon_exit_for_cond) count = @monitor.__send__(:mon_exit_for_cond)
@waiters.push(Thread.current) @waiters.push(Thread.current)
begin begin
@ -107,7 +107,7 @@ module MonitorMixin
if @waiters.include?(Thread.current) # interrupted? if @waiters.include?(Thread.current) # interrupted?
@waiters.delete(Thread.current) @waiters.delete(Thread.current)
end end
@monitor.send(:mon_enter_for_cond, count) @monitor.__send__(:mon_enter_for_cond, count)
Thread.critical = false Thread.critical = false
end end
end end
@ -125,7 +125,7 @@ module MonitorMixin
end end
def signal def signal
@monitor.send(:mon_check_owner) @monitor.__send__(:mon_check_owner)
Thread.critical = true Thread.critical = true
t = @waiters.shift t = @waiters.shift
t.wakeup if t t.wakeup if t
@ -134,7 +134,7 @@ module MonitorMixin
end end
def broadcast def broadcast
@monitor.send(:mon_check_owner) @monitor.__send__(:mon_check_owner)
Thread.critical = true Thread.critical = true
for t in @waiters for t in @waiters
t.wakeup t.wakeup
@ -172,7 +172,7 @@ module MonitorMixin
def self.extend_object(obj) def self.extend_object(obj)
super(obj) super(obj)
obj.send(:mon_initialize) obj.__send__(:mon_initialize)
end end
# #