mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (here_document): check if identifier is terminated.
(ruby-bugs-ja:PR#239) * parse.y (yylex): should pushback proper char after '**'. (ruby-bugs-ja:PR#240) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f14180707d
commit
2263dbe022
3 changed files with 21 additions and 5 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Mon Jun 3 07:07:07 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
|
* parse.y (here_document): check if identifier is terminated.
|
||||||
|
(ruby-bugs-ja:PR#239)
|
||||||
|
|
||||||
|
* parse.y (yylex): should pushback proper char after '**'.
|
||||||
|
(ruby-bugs-ja:PR#240)
|
||||||
|
|
||||||
Sat Jun 1 19:20:07 2002 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
Sat Jun 1 19:20:07 2002 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||||
|
|
||||||
* ext/win32ole: merge from rough
|
* ext/win32ole: merge from rough
|
||||||
|
|
10
parse.y
10
parse.y
|
@ -2897,6 +2897,14 @@ here_document(term, indent)
|
||||||
case '"':
|
case '"':
|
||||||
case '`':
|
case '`':
|
||||||
while ((c = nextc()) != term) {
|
while ((c = nextc()) != term) {
|
||||||
|
switch (c) {
|
||||||
|
case -1:
|
||||||
|
rb_compile_error("unterminated here document identifier meets end of file");
|
||||||
|
return 0;
|
||||||
|
case '\n':
|
||||||
|
rb_compile_error("unterminated here document identifier meets end of line");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
tokadd(c);
|
tokadd(c);
|
||||||
}
|
}
|
||||||
if (term == '\'') term = 0;
|
if (term == '\'') term = 0;
|
||||||
|
@ -3069,7 +3077,7 @@ yylex()
|
||||||
|
|
||||||
case '*':
|
case '*':
|
||||||
if ((c = nextc()) == '*') {
|
if ((c = nextc()) == '*') {
|
||||||
if (nextc() == '=') {
|
if ((c = nextc()) == '=') {
|
||||||
lex_state = EXPR_BEG;
|
lex_state = EXPR_BEG;
|
||||||
yylval.id = tPOW;
|
yylval.id = tPOW;
|
||||||
return tOP_ASGN;
|
return tOP_ASGN;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define RUBY_VERSION "1.7.2"
|
#define RUBY_VERSION "1.7.2"
|
||||||
#define RUBY_RELEASE_DATE "2002-05-30"
|
#define RUBY_RELEASE_DATE "2002-06-03"
|
||||||
#define RUBY_VERSION_CODE 172
|
#define RUBY_VERSION_CODE 172
|
||||||
#define RUBY_RELEASE_CODE 20020530
|
#define RUBY_RELEASE_CODE 20020603
|
||||||
|
|
Loading…
Reference in a new issue