Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Module#public (and some method) with untrusted will not throw a Secur…

…ityError.

Test Script:
{{{
class T
  def foo ; end
end

module M
  def bar ; end
end

T.untrust
M.untrust
$SAFE = 4

T.class_eval{ public :foo }
T.class_eval{ protected :foo }
T.class_eval{ private :foo }

M.module_eval{ module_function :bar }
}}}

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5151 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
commit ed44bd984dcbff5644afebb69e5d5d0dca429cf4 1 parent 2a7e2e5
@Watson1978 Watson1978 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  vm_method.c
View
2  vm_method.c
@@ -421,7 +421,7 @@ rb_mod_alias_method(VALUE mod, SEL sel, VALUE newname, VALUE oldname)
static void
secure_visibility(VALUE self)
{
- if (rb_safe_level() >= 4 && !OBJ_TAINTED(self)) {
+ if (rb_safe_level() >= 4 && !OBJ_UNTRUSTED(self)) {
rb_raise(rb_eSecurityError,
"Insecure: can't change method visibility");
}
Please sign in to comment.
Something went wrong with that request. Please try again.