1
0
Fork 0
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:
aamine 2003-05-19 04:48:57 +00:00
parent fd2f7ab576
commit f50984366b
2 changed files with 13 additions and 6 deletions

View file

@ -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>
* lib/date.rb: use warn() instead of $stderr.puts().

12
re.c
View file

@ -1382,24 +1382,24 @@ rb_reg_quote(str)
break;
case ' ':
*t++ = '\\';
*t++ = 's';
break;
*t++ = ' ';
continue;
case '\t':
*t++ = '\\';
*t++ = 't';
break;
continue;
case '\n':
*t++ = '\\';
*t++ = 'n';
break;
continue;
case '\r':
*t++ = '\\';
*t++ = 'r';
break;
continue;
case '\f':
*t++ = '\\';
*t++ = 'f';
break;
continue;
}
*t++ = c;
}