Project

General

Profile

Backport #5702 ยป backport_5702.patch

nagachika (Tomoyuki Chikanaga), 12/05/2011 10:14 AM

View differences:

variable.c
2119 2119
	VALUE val = argv[i];
2120 2120
	id = rb_check_id(&val);
2121 2121
	if (!id) {
2122
	    if ( i > 0 )
2123
		rb_clear_cache_by_class(mod);
2122 2124
	    rb_name_error_str(val, "constant %s::%s not defined", rb_class2name(mod), RSTRING_PTR(val));
2123 2125
	}
2124
	if (RCLASS_CONST_TBL(mod) && st_lookup(RCLASS_CONST_TBL(mod), (st_data_t)id, &v)) {
2126
	if (RCLASS_CONST_TBL(mod) &&
2127
	    st_lookup(RCLASS_CONST_TBL(mod), (st_data_t)id, &v)) {
2125 2128
	    ((rb_const_entry_t*)v)->flag = flag;
2126
	    continue;
2127 2129
	}
2128
	rb_name_error(id, "constant %s::%s not defined", rb_class2name(mod), rb_id2name(id));
2130
	else {
2131
	    if ( i > 0 )
2132
		rb_clear_cache_by_class(mod);
2133
	    rb_name_error(id, "constant %s::%s not defined", rb_class2name(mod), rb_id2name(id));
2134
	}
2129 2135
    }
2130 2136
    rb_clear_cache_by_class(mod);
2131 2137
}