mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* re.c (rb_reg_quote): \n \r \f \v quoting was wrong.
* re.c (rb_reg_quote): rb_reg_quote(" ") should be "\\ ", not "\\s". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fd2f7ab576
commit
f50984366b
2 changed files with 13 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Mon May 19 13:51:50 2003 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
|
* re.c (rb_reg_quote): \n \r \f \v quoting was wrong.
|
||||||
|
|
||||||
|
* re.c (rb_reg_quote): rb_reg_quote(" ") should be "\\ ", not
|
||||||
|
"\\s".
|
||||||
|
|
||||||
Mon May 19 08:08:51 2003 Tadayoshi Funaba <tadf@dotrb.org>
|
Mon May 19 08:08:51 2003 Tadayoshi Funaba <tadf@dotrb.org>
|
||||||
|
|
||||||
* lib/date.rb: use warn() instead of $stderr.puts().
|
* lib/date.rb: use warn() instead of $stderr.puts().
|
||||||
|
|
12
re.c
12
re.c
|
@ -1382,24 +1382,24 @@ rb_reg_quote(str)
|
||||||
break;
|
break;
|
||||||
case ' ':
|
case ' ':
|
||||||
*t++ = '\\';
|
*t++ = '\\';
|
||||||
*t++ = 's';
|
*t++ = ' ';
|
||||||
break;
|
continue;
|
||||||
case '\t':
|
case '\t':
|
||||||
*t++ = '\\';
|
*t++ = '\\';
|
||||||
*t++ = 't';
|
*t++ = 't';
|
||||||
break;
|
continue;
|
||||||
case '\n':
|
case '\n':
|
||||||
*t++ = '\\';
|
*t++ = '\\';
|
||||||
*t++ = 'n';
|
*t++ = 'n';
|
||||||
break;
|
continue;
|
||||||
case '\r':
|
case '\r':
|
||||||
*t++ = '\\';
|
*t++ = '\\';
|
||||||
*t++ = 'r';
|
*t++ = 'r';
|
||||||
break;
|
continue;
|
||||||
case '\f':
|
case '\f':
|
||||||
*t++ = '\\';
|
*t++ = '\\';
|
||||||
*t++ = 'f';
|
*t++ = 'f';
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
*t++ = c;
|
*t++ = c;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue