diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/monitor.rb | 12 |
2 files changed, 10 insertions, 6 deletions
@@ -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> * lib/soap/streamHandler.rb: support latest released version of diff --git a/lib/monitor.rb b/lib/monitor.rb index cca7fcb400..5d5c623646 100644 --- a/lib/monitor.rb +++ b/lib/monitor.rb @@ -87,11 +87,11 @@ module MonitorMixin class Timeout < Exception; end def wait(timeout = nil) - @monitor.send(:mon_check_owner) + @monitor.__send__(:mon_check_owner) timer = create_timer(timeout) Thread.critical = true - count = @monitor.send(:mon_exit_for_cond) + count = @monitor.__send__(:mon_exit_for_cond) @waiters.push(Thread.current) begin @@ -107,7 +107,7 @@ module MonitorMixin if @waiters.include?(Thread.current) # interrupted? @waiters.delete(Thread.current) end - @monitor.send(:mon_enter_for_cond, count) + @monitor.__send__(:mon_enter_for_cond, count) Thread.critical = false end end @@ -125,7 +125,7 @@ module MonitorMixin end def signal - @monitor.send(:mon_check_owner) + @monitor.__send__(:mon_check_owner) Thread.critical = true t = @waiters.shift t.wakeup if t @@ -134,7 +134,7 @@ module MonitorMixin end def broadcast - @monitor.send(:mon_check_owner) + @monitor.__send__(:mon_check_owner) Thread.critical = true for t in @waiters t.wakeup @@ -172,7 +172,7 @@ module MonitorMixin def self.extend_object(obj) super(obj) - obj.send(:mon_initialize) + obj.__send__(:mon_initialize) end # |