diff --git a/ChangeLog b/ChangeLog index b2e5ab3b85..894e5e6ea3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Jun 20 07:17:52 2009 Yukihiro Matsumoto + + * lib/monitor.rb (MonitorMixin::extend_object): should use + #__send__ instead of #send to avoid possible name conflict. + [ruby-core:23907] + Sat Jun 20 06:56:31 2009 Tadayoshi Funaba * complex.c: edited rdoc. diff --git a/lib/monitor.rb b/lib/monitor.rb index 00d85fae52..b9bf28ded0 100644 --- a/lib/monitor.rb +++ b/lib/monitor.rb @@ -91,13 +91,13 @@ module MonitorMixin if timeout raise NotImplementedError, "timeout is not implemented yet" end - @monitor.send(:mon_check_owner) - count = @monitor.send(:mon_exit_for_cond) + @monitor.__send__(:mon_check_owner) + count = @monitor.__send__(:mon_exit_for_cond) begin @cond.wait(@monitor.instance_variable_get("@mon_mutex")) return true ensure - @monitor.send(:mon_enter_for_cond, count) + @monitor.__send__(:mon_enter_for_cond, count) end end @@ -114,12 +114,12 @@ module MonitorMixin end def signal - @monitor.send(:mon_check_owner) + @monitor.__send__(:mon_check_owner) @cond.signal end def broadcast - @monitor.send(:mon_check_owner) + @monitor.__send__(:mon_check_owner) @cond.broadcast end @@ -137,7 +137,7 @@ module MonitorMixin def self.extend_object(obj) super(obj) - obj.send(:mon_initialize) + obj.__send__(:mon_initialize) end #