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): quote \v as well.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-11-04 15:03:31 +00:00
parent 794fc684e8
commit af9c868eae
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Mon Nov 5 00:01:33 2007 Tanaka Akira <akr@fsij.org>
* re.c (rb_reg_quote): quote \v as well.
Sun Nov 4 23:51:59 2007 Tanaka Akira <akr@fsij.org>
* re.c (rb_reg_initialize_m): use StringValuePtr instead of

6
re.c
View file

@ -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;
}