diff --git a/ChangeLog b/ChangeLog index 89ed569f4f..61fd052333 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon May 19 13:51:50 2003 Minero Aoki + + * 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 * lib/date.rb: use warn() instead of $stderr.puts(). diff --git a/re.c b/re.c index 29e2b94e09..f27f99364f 100644 --- a/re.c +++ b/re.c @@ -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; }