summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-06 09:49:53 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-06 09:49:53 (GMT)
commit72cf24c813aa788366ef4a6fc0be0491cdcaaf95 (patch)
tree2d6ed7860828db1dc997109bacd77bc0cb661cba /vm_method.c
parentaa4de7328d3126288282c76a56b49a544de5e9a3 (diff)
* method.h: remove METHOD_ENTRY_SAFE(me) and related code
because $SAFE = 3 and 4 is not available. Now, $SAFE is not checked on method dispatch at all. * vm_eval.c, vm_insnhelper.c, vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/vm_method.c b/vm_method.c
index 9b9dd13..498fd7e 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -369,7 +369,7 @@ rb_method_entry_t *
rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def)
{
rb_method_entry_t *me = rb_method_entry_alloc(called_id, klass, filter_defined_class(klass), def);
- METHOD_ENTRY_FLAGS_SET(me, visi, ruby_running ? FALSE : TRUE, rb_safe_level());
+ METHOD_ENTRY_FLAGS_SET(me, visi, ruby_running ? FALSE : TRUE);
if (def != NULL) method_definition_reset(me);
return me;
}
@@ -604,7 +604,6 @@ method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *me,
{
rb_method_entry_t *newme = rb_method_entry_make(klass, mid, defined_class, visi,
me->def->type, method_definition_addref(me->def), 0, NULL);
- METHOD_ENTRY_SAFE_SET(newme, METHOD_ENTRY_SAFE(me));
method_added(klass, mid);
return newme;
}
@@ -1504,7 +1503,6 @@ rb_alias(VALUE klass, ID alias_name, ID original_name)
alias_me = rb_add_method(target_klass, alias_name, VM_METHOD_TYPE_ALIAS, (void *)rb_method_entry_clone(orig_me), visi);
alias_me->def->original_id = orig_me->called_id;
- METHOD_ENTRY_SAFE_SET(alias_me, METHOD_ENTRY_SAFE(orig_me));
}
else {
rb_method_entry_t *alias_me;