summaryrefslogtreecommitdiffstats
path: root/lib/drb/drb.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-22 13:42:28 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-22 13:42:28 +0000
commit58a66bb0122c285dcb9874530c028128883b7d1d (patch)
tree1b85d05e4b1b215509077fc27031e7f668a323d3 /lib/drb/drb.rb
parent6e9d30c5e04b5f0488a7d11ecb1f8a471db5a6df (diff)
downloadruby-58a66bb0122c285dcb9874530c028128883b7d1d.tar.gz
ruby-58a66bb0122c285dcb9874530c028128883b7d1d.tar.xz
ruby-58a66bb0122c285dcb9874530c028128883b7d1d.zip
* lib/drb/drb.rb (DRb::DRbServer::check_insecure_method): should
check method names by symbols, not by strings. a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com> in [ruby-dev:34487]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/drb/drb.rb')
-rw-r--r--lib/drb/drb.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb
index 20e658e61..0e6212838 100644
--- a/lib/drb/drb.rb
+++ b/lib/drb/drb.rb
@@ -1476,10 +1476,10 @@ module DRb
raise(ArgumentError, "#{any_to_s(msg_id)} is not a symbol") unless Symbol == msg_id.class
raise(SecurityError, "insecure method `#{msg_id}'") if insecure_method?(msg_id)
- if obj.private_methods.include?(msg_id.to_s)
+ if obj.private_methods.include?(msg_id)
desc = any_to_s(obj)
raise NoMethodError, "private method `#{msg_id}' called for #{desc}"
- elsif obj.protected_methods.include?(msg_id.to_s)
+ elsif obj.protected_methods.include?(msg_id)
desc = any_to_s(obj)
raise NoMethodError, "protected method `#{msg_id}' called for #{desc}"
else