Project

General

Profile

Feature #5112 ยป 0001-Remove-inadvertent-symbol-creation-from-send-__send_.patch

jeremyevans0 (Jeremy Evans), 07/28/2011 04:25 PM

View differences:

vm_eval.c
static VALUE
send_internal(int argc, const VALUE *argv, VALUE recv, call_type scope)
{
ID id;
VALUE vid;
VALUE self = RUBY_VM_PREVIOUS_CONTROL_FRAME(GET_THREAD()->cfp)->self;
rb_thread_t *th = GET_THREAD();
......
vid = *argv++; argc--;
PASS_PASSED_BLOCK_TH(th);
return rb_call0(recv, rb_to_id(vid), argc, argv, scope, self);
id = rb_check_id(&vid);
if (!id) {
if (!rb_method_basic_definition_p(CLASS_OF(recv), idMethodMissing)) {
id = rb_to_id(vid);
}
else {
rb_raise(rb_eNoMethodError, "undefined method `%s' for %s", RSTRING_PTR(vid),
rb_class2name(CLASS_OF(recv)));
}
}
return rb_call0(recv, id, argc, argv, scope, self);
}
/*
vm_insnhelper.c
}
sym = TOPN(i);
id = SYMBOL_P(sym) ? SYM2ID(sym) : rb_to_id(sym);
id = SYMBOL_P(sym) ? SYM2ID(sym) : rb_check_id(&sym);
if (!id) {
if (!rb_method_basic_definition_p(CLASS_OF(recv), idMethodMissing)) {
id = rb_to_id(sym);
}
else {
rb_raise(rb_eNoMethodError, "undefined method `%s' for %s", RSTRING_PTR(sym),
rb_class2name(CLASS_OF(recv)));
}
}
/* shift arguments */
if (i > 0) {
MEMMOVE(&TOPN(i), &TOPN(i-1), VALUE, i);
    (1-1/1)