mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
f80616b6d2
commit
f07ca6b1c4
2 changed files with 8 additions and 2 deletions
|
@ -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>
|
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
|
* 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(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)
|
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)
|
desc = any_to_s(obj)
|
||||||
raise NoMethodError, "private method `#{msg_id}' called for #{desc}"
|
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)
|
desc = any_to_s(obj)
|
||||||
raise NoMethodError, "protected method `#{msg_id}' called for #{desc}"
|
raise NoMethodError, "protected method `#{msg_id}' called for #{desc}"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue