mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (tokadd_escape): refactored. [ruby-core:15657]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
15c0648d00
commit
a0ec9f61d1
2 changed files with 8 additions and 6 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Feb 26 15:43:42 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* parse.y (tokadd_escape): refactored. [ruby-core:15657]
|
||||
|
||||
Mon Feb 25 17:30:29 2008 Technorama Ltd. <oss-ruby@technorama.net>
|
||||
|
||||
* ext/openssl/digest.c ext/openssl/lib/openssl/digest.rb:
|
||||
|
|
8
parse.y
8
parse.y
|
@ -2890,8 +2890,7 @@ read_escape()
|
|||
}
|
||||
|
||||
static int
|
||||
tokadd_escape(term)
|
||||
int term;
|
||||
tokadd_escape()
|
||||
{
|
||||
int c;
|
||||
|
||||
|
@ -2956,7 +2955,7 @@ tokadd_escape(term)
|
|||
tokadd('\\'); tokadd('c');
|
||||
escaped:
|
||||
if ((c = nextc()) == '\\') {
|
||||
return tokadd_escape(term);
|
||||
return tokadd_escape();
|
||||
}
|
||||
else if (c == -1) goto eof;
|
||||
tokadd(c);
|
||||
|
@ -2968,7 +2967,6 @@ tokadd_escape(term)
|
|||
return -1;
|
||||
|
||||
default:
|
||||
if (c != '\\' || c != term)
|
||||
tokadd('\\');
|
||||
tokadd(c);
|
||||
}
|
||||
|
@ -3089,7 +3087,7 @@ tokadd_string(func, term, paren, nest)
|
|||
default:
|
||||
if (func & STR_FUNC_REGEXP) {
|
||||
pushback(c);
|
||||
if (tokadd_escape(term) < 0)
|
||||
if (tokadd_escape() < 0)
|
||||
return -1;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue