summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-19 04:48:57 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-19 04:48:57 +0000
commitf50984366b923176b4e5f10efd87e0a85829afa8 (patch)
treef7cfe431a5a51201bd6a2d9a4be68be455624dc7 /re.c
parentfd2f7ab576b71f4c40def22d30109e544553a93a (diff)
* 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
Diffstat (limited to 're.c')
-rw-r--r--re.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/re.c b/re.c
index 29e2b94..f27f993 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;
}