diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-16 15:48:25 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-16 15:48:25 +0000 |
commit | c335637188e9223fe2e76f3a163567be286bd2b1 (patch) | |
tree | 4b256ee6349557ffbc127fa7c0b70cf0d03504ba | |
parent | 3011c54cf06dbc25878a00a4d594704cdba23628 (diff) | |
download | ruby-c335637188e9223fe2e76f3a163567be286bd2b1.tar.gz ruby-c335637188e9223fe2e76f3a163567be286bd2b1.tar.xz ruby-c335637188e9223fe2e76f3a163567be286bd2b1.zip |
* dir.c (bracket): fix escape handling for range character in bracket
of fnmatch pattern. e.g., '[a\-c]' should not match 'b'.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | dir.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri Apr 17 00:45:09 2009 Yusuke Endoh <mame@tsg.ne.jp> + + * dir.c (bracket): fix escape handling for range character in bracket + of fnmatch pattern. e.g., '[a\-c]' should not match 'b'. + Thu Apr 16 23:09:03 2009 Tanaka Akira <akr@fsij.org> * class.c (rb_define_method_id): use rb_define_notimplement_method_id @@ -109,7 +109,7 @@ bracket( t1++; if (!*t1) return NULL; - p += (r = rb_enc_mbclen(t1, pend, enc)); + p = t1 + (r = rb_enc_mbclen(t1, pend, enc)); if (p[0] == '-' && p[1] != ']') { const char *t2 = p + 1; int r2; |