* string.c (trnext): support backslash escape in String#tr.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2001-03-04 09:46:08 +00:00
parent b3902727d5
commit d08f28d839
3 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,7 @@
Sun Mar 4 17:01:09 2001 WATANABE Hirofumi <eban@ruby-lang.org>
* string.c (trnext): support backslash escape in String#tr.
Wed Feb 28 11:02:41 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c (rb_str_delete_bang): delete! should take at least 1
@ -201,7 +205,7 @@ Wed Feb 14 17:28:24 2001 Shugo Maeda <shugo@ruby-lang.org>
Wed Feb 14 00:44:17 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
* dir.c (dir_s_glob): supprt backslash escape of metacharacters
* dir.c (dir_s_glob): support backslash escape of metacharacters
and delimiters.
* dir.c (remove_backslases): remove backslashes from path before

View File

@ -1801,7 +1801,10 @@ trnext(t)
if (!t->gen) {
if (t->p == t->pend) return -1;
t->now = *(USTR)t->p++;
if (t->p < t->pend - 1 && *t->p == '-') {
if (t->p < t->pend - 1 && *t->p == '\\') {
t->p++;
}
else if (t->p < t->pend - 1 && *t->p == '-') {
t->p++;
if (t->p < t->pend) {
if (t->now > *(USTR)t->p) {

View File

@ -1,4 +1,4 @@
#define RUBY_VERSION "1.7.0"
#define RUBY_RELEASE_DATE "2001-02-28"
#define RUBY_RELEASE_DATE "2001-03-04"
#define RUBY_VERSION_CODE 170
#define RUBY_RELEASE_CODE 20010228
#define RUBY_RELEASE_CODE 20010304