summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-15 15:15:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-15 15:15:45 +0000
commit127497c614a08818b4b19253f9408c7d45c3b29a (patch)
tree02a046782533638bea2659f7434ca40473713541 /parse.y
parent2fb5d9435e391d34ad2ec2e7a92ed0cd4394b609 (diff)
* parse.y (yylex): disallow alpha-numeric and mbchar for
terminator of %string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index b6ee1492d1..47fb3ab56b 100644
--- a/parse.y
+++ b/parse.y
@@ -3428,6 +3428,10 @@ yylex()
}
else {
term = nextc();
+ if (ISALNUM(term) || ismbchar(term)) {
+ yyerror("unknown type of %string");
+ return 0;
+ }
}
if (c == -1 || term == -1) {
rb_compile_error("unterminated quoted string meets end of file");