Project

General

Profile

Bug #5536 ยป 0001-string.c-rb_str_start_with-rb_str_end_with-raise-an-.patch

second set of patchs (fix) - Eregon (Benoit Daloze), 03/25/2012 09:11 PM

View differences:

string.c
7196 7196
    int i;
7197 7197

  
7198 7198
    for (i=0; i<argc; i++) {
7199
	VALUE tmp = rb_check_string_type(argv[i]);
7200
	if (NIL_P(tmp)) continue;
7199
	VALUE tmp = argv[i];
7200
	StringValue(tmp);
7201 7201
	rb_enc_check(str, tmp);
7202 7202
	if (RSTRING_LEN(str) < RSTRING_LEN(tmp)) continue;
7203 7203
	if (memcmp(RSTRING_PTR(str), RSTRING_PTR(tmp), RSTRING_LEN(tmp)) == 0)
......
7221 7221
    rb_encoding *enc;
7222 7222

  
7223 7223
    for (i=0; i<argc; i++) {
7224
	VALUE tmp = rb_check_string_type(argv[i]);
7225
	if (NIL_P(tmp)) continue;
7224
	VALUE tmp = argv[i];
7225
	StringValue(tmp);
7226 7226
	enc = rb_enc_check(str, tmp);
7227 7227
	if (RSTRING_LEN(str) < RSTRING_LEN(tmp)) continue;
7228 7228
	p = RSTRING_PTR(str);
7229
-