--- Revision None +++ Revision 663537343061 @@ -0,0 +1,388 @@ +--- array.c (revision 25052) ++++ array.c (working copy) +@@ -2708,8 +2708,8 @@ + static VALUE + rb_ary_times(VALUE ary, VALUE times) + { +- VALUE ary2, tmp; +- long i, len; ++ VALUE ary2, tmp, *ptr, *ptr2; ++ long i, t, len; + + tmp = rb_check_string_type(times); + if (!NIL_P(tmp)) { +@@ -2732,8 +2732,11 @@ + ary2 = ary_new(rb_obj_class(ary), len); + ARY_SET_LEN(ary2, len); + +- for (i=0; i= 0) { + regs = RMATCH_REGS(rb_backref_get()); + if (start == end && BEG(0) == END(0)) { +- if (!RSTRING_PTR(str)) { ++ if (!ptr) { + rb_ary_push(result, rb_str_new("", 0)); + break; + } + else if (last_null == 1) { + rb_ary_push(result, rb_str_subseq(str, beg, +- rb_enc_fast_mbclen(RSTRING_PTR(str)+beg, +- RSTRING_END(str), ++ rb_enc_fast_mbclen(ptr+beg, ++ ptr+len, + enc))); + beg = start; + } + else { +- if (RSTRING_PTR(str)+start == RSTRING_END(str)) ++ if (ptr+start == ptr+len) + start++; + else +- start += rb_enc_fast_mbclen(RSTRING_PTR(str)+start,RSTRING_END(str),enc); ++ start += rb_enc_fast_mbclen(ptr+start,ptr+len,enc); + last_null = 1; + continue; + } +--- struct.c (revision 25052) ++++ struct.c (working copy) +@@ -98,14 +98,17 @@ + VALUE + rb_struct_getmember(VALUE obj, ID id) + { +- VALUE members, slot; +- long i; ++ VALUE members, slot, *ptr, *ptr_members; ++ long i, len; + ++ ptr = RSTRUCT_PTR(obj); + members = rb_struct_members(obj); ++ ptr_members = RARRAY_PTR(members); + slot = ID2SYM(id); +- for (i=0; i"); + OBJ_INFECT(str, s); +@@ -588,14 +600,16 @@ + static VALUE + rb_struct_aref_id(VALUE s, ID id) + { +- VALUE members; ++ VALUE *ptr, members, *ptr_members; + long i, len; + ++ ptr = RSTRUCT_PTR(s); + members = rb_struct_members(s); ++ ptr_members = RARRAY_PTR(members); + len = RARRAY_LEN(members); + for (i=0; i