зеркало из https://github.com/github/ruby.git
* file.c (rmext): no extension to strip if empty string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a2905fb2a0
Коммит
b094ab0948
|
@ -1,4 +1,6 @@
|
||||||
Wed Jan 25 11:32:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Jan 25 11:40:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* file.c (rmext): no extension to strip if empty string.
|
||||||
|
|
||||||
* file.c (rb_enc_path_next, rb_enc_path_skip_prefix)
|
* file.c (rb_enc_path_next, rb_enc_path_skip_prefix)
|
||||||
(rb_enc_path_last_separator, rb_enc_path_end)
|
(rb_enc_path_last_separator, rb_enc_path_end)
|
||||||
|
|
2
file.c
2
file.c
|
@ -3535,7 +3535,7 @@ rmext(const char *p, long l0, long l1, const char *e, long l2, rb_encoding *enc)
|
||||||
unsigned int c;
|
unsigned int c;
|
||||||
const char *s, *last;
|
const char *s, *last;
|
||||||
|
|
||||||
if (!e) return 0;
|
if (!e || !l2) return 0;
|
||||||
|
|
||||||
c = rb_enc_codepoint_len(e, e + l2, &len1, enc);
|
c = rb_enc_codepoint_len(e, e + l2, &len1, enc);
|
||||||
if (rb_enc_ascget(e + len1, e + l2, &len2, enc) == '*' && len1 + len2 == l2) {
|
if (rb_enc_ascget(e + len1, e + l2, &len2, enc) == '*' && len1 + len2 == l2) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче