* string.c (rb_str_end_with): compares with the suffix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e22ff0c9b6
commit
6c6ae98663
@ -1,3 +1,7 @@
|
|||||||
|
Thu Feb 7 15:42:42 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* string.c (rb_str_end_with): compares with the suffix.
|
||||||
|
|
||||||
Thu Feb 7 15:03:15 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
Thu Feb 7 15:03:15 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* enc/trans/korean.c: add support for CP949 by Park Ji-In.
|
* enc/trans/korean.c: add support for CP949 by Park Ji-In.
|
||||||
|
2
string.c
2
string.c
@ -5663,7 +5663,7 @@ rb_str_end_with(int argc, VALUE *argv, VALUE str)
|
|||||||
s = p + RSTRING_LEN(str) - RSTRING_LEN(tmp);
|
s = p + RSTRING_LEN(str) - RSTRING_LEN(tmp);
|
||||||
if (rb_enc_left_char_head(p, s, enc) != s)
|
if (rb_enc_left_char_head(p, s, enc) != s)
|
||||||
continue;
|
continue;
|
||||||
if (memcmp(s, p, RSTRING_LEN(tmp)) == 0)
|
if (memcmp(s, RSTRING_PTR(tmp), RSTRING_LEN(tmp)) == 0)
|
||||||
return Qtrue;
|
return Qtrue;
|
||||||
}
|
}
|
||||||
return Qfalse;
|
return Qfalse;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user