Skip to content

Commit

Permalink
* regex.c (re_compile_pattern): should check if c is not a
Browse files Browse the repository at this point in the history
  multibyte chracter.  a patch from KIMURA Koichi
  <kimura.koichi at canon.co.jp>.  [ruby-dev:28598]


git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Apr 24, 2006
1 parent 10de170 commit 31dddcd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
Tue Apr 25 00:08:24 2006 Yukihiro Matsumoto <matz@ruby-lang.org>

* regex.c (re_compile_pattern): should check if c is not a
multibyte chracter. a patch from KIMURA Koichi
<kimura.koichi at canon.co.jp>. [ruby-dev:28598]

Fri Apr 21 15:19:13 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>

* ext/tk/tcltklib.c (lib_eventloop_ensure): refer freed pointer
Expand Down
3 changes: 2 additions & 1 deletion ext/.document
Expand Up @@ -4,7 +4,8 @@ enumerator/enumerator.c
iconv/iconv.c
nkf/lib/kconv.rb
nkf/nkf.c
socket/socket.c
stringio/stringio.c
strscan/strscan.c
zlib/zlib.c
win32ole
zlib/zlib.c
2 changes: 1 addition & 1 deletion regex.c
Expand Up @@ -1705,7 +1705,7 @@ re_compile_pattern(pattern, size, bufp)
goto range_retry;
}
else {
if (TRANSLATE_P()) c = (unsigned char)translate[c];
if (TRANSLATE_P() && c < 0x100) c = (unsigned char)translate[c];
if (had_mbchar == 0 && (!current_mbctype || !had_num_literal)) {
SET_LIST_BIT(c);
had_num_literal = 0;
Expand Down

0 comments on commit 31dddcd

Please sign in to comment.