ruby-changes:12084
From: matz <ko1@a...>
Date: Sat, 20 Jun 2009 07:20:12 +0900 (JST)
Subject: [ruby-changes:12084] Ruby:r23754 (trunk): * lib/monitor.rb (MonitorMixin::extend_object): should use
matz 2009-06-20 07:19:56 +0900 (Sat, 20 Jun 2009) New Revision: 23754 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23754 Log: * lib/monitor.rb (MonitorMixin::extend_object): should use #__send__ instead of #send to avoid possible name conflict. [ruby-core:23907] Modified files: trunk/ChangeLog trunk/lib/monitor.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 23753) +++ ChangeLog (revision 23754) @@ -1,3 +1,9 @@ +Sat Jun 20 07:17:52 2009 Yukihiro Matsumoto <matz@r...> + + * 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 <tadf@d...> * complex.c: edited rdoc. Index: lib/monitor.rb =================================================================== --- lib/monitor.rb (revision 23753) +++ lib/monitor.rb (revision 23754) @@ -91,13 +91,13 @@ 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 @@ 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 @@ def self.extend_object(obj) super(obj) - obj.send(:mon_initialize) + obj.__send__(:mon_initialize) end # -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/