Project

General

Profile

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

Eregon (Benoit Daloze), 11/01/2011 09:43 PM

View differences:

string.c
7163 7163
    int i;
7164 7164

  
7165 7165
    for (i=0; i<argc; i++) {
7166
	VALUE tmp = rb_check_string_type(argv[i]);
7167
	if (NIL_P(tmp)) continue;
7166
	VALUE tmp = argv[i];
7167
	StringValue(tmp);
7168 7168
	rb_enc_check(str, tmp);
7169 7169
	if (RSTRING_LEN(str) < RSTRING_LEN(tmp)) continue;
7170 7170
	if (memcmp(RSTRING_PTR(str), RSTRING_PTR(tmp), RSTRING_LEN(tmp)) == 0)
......
7188 7188
    rb_encoding *enc;
7189 7189

  
7190 7190
    for (i=0; i<argc; i++) {
7191
	VALUE tmp = rb_check_string_type(argv[i]);
7192
	if (NIL_P(tmp)) continue;
7191
	VALUE tmp = argv[i];
7192
	StringValue(tmp);
7193 7193
	enc = rb_enc_check(str, tmp);
7194 7194
	if (RSTRING_LEN(str) < RSTRING_LEN(tmp)) continue;
7195 7195
	p = RSTRING_PTR(str);
7196
-