diff options
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -7197,8 +7197,8 @@ rb_str_start_with(int argc, VALUE *argv, VALUE str) int i; for (i=0; i<argc; i++) { - VALUE tmp = rb_check_string_type(argv[i]); - if (NIL_P(tmp)) continue; + VALUE tmp = argv[i]; + StringValue(tmp); rb_enc_check(str, tmp); if (RSTRING_LEN(str) < RSTRING_LEN(tmp)) continue; if (memcmp(RSTRING_PTR(str), RSTRING_PTR(tmp), RSTRING_LEN(tmp)) == 0) @@ -7222,8 +7222,8 @@ rb_str_end_with(int argc, VALUE *argv, VALUE str) rb_encoding *enc; for (i=0; i<argc; i++) { - VALUE tmp = rb_check_string_type(argv[i]); - if (NIL_P(tmp)) continue; + VALUE tmp = argv[i]; + StringValue(tmp); enc = rb_enc_check(str, tmp); if (RSTRING_LEN(str) < RSTRING_LEN(tmp)) continue; p = RSTRING_PTR(str); |