* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@16155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2008-04-22 13:42:28 +00:00
Родитель f80616b6d2
Коммит f07ca6b1c4
2 изменённых файлов: 8 добавлений и 2 удалений

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

@ -1,3 +1,9 @@
Tue Apr 22 22:40:57 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* 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].
Tue Apr 22 22:15:54 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* misc/ruby-style.el (ruby-style-{case,label}-indent): up list from

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

@ -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