Check_insecure_method in trunk/lib/drb/drb.rb

[email protected]>;3OB9-$G$9!#e(B

1.9e$B$Ne(Blib/drb/drb.rbe$B$Ne(Bcheck_insecure_methode$B$Oe(B
obj.private_methods.include?(msg_id.to_s)e$B$N$h$&$Ke(B
e$B$J$C$F$$$F!"e(Bprivate_methodse$B$J$I$,e(BSymbole$B$NG[Ns$re(B
e$BJV$9$N$Ge(Bprivatee$B%a%=%C%I$He(Bprotectede$B%a%=%C%I$Ne(B
e$B%A%’%C%/$,=PMh$F$$$^$;$s!#e(B

Index: lib/drb/drb.rb

— lib/drb/drb.rb (revision 16147)
+++ lib/drb/drb.rb (working copy)
@@ -1476,10 +1476,10 @@
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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs