summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-04 15:03:31 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-04 15:03:31 +0000
commitaf9c868eae89487e8083a61837479efad69b5c19 (patch)
treeb35b72247dd88865adf6a825679311bbfc714459 /re.c
parent794fc684e8441afb840137e16fb26eafe3245c05 (diff)
* re.c (rb_reg_quote): quote \v as well.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/re.c b/re.c
index a6b9828a69..573fb2ee3b 100644
--- a/re.c
+++ b/re.c
@@ -1653,7 +1653,7 @@ rb_reg_quote(VALUE str)
case '*': case '.': case '\\':
case '?': case '+': case '^': case '$':
case ' ': case '#':
- case '\t': case '\f': case '\n': case '\r':
+ case '\t': case '\f': case '\v': case '\n': case '\r':
goto meta_found;
}
}
@@ -1705,6 +1705,10 @@ rb_reg_quote(VALUE str)
*t++ = '\\';
*t++ = 'f';
continue;
+ case '\v':
+ *t++ = '\\';
+ *t++ = 'v';
+ continue;
}
*t++ = c;
}