From 093595801f7d8d3f31d87b2a1dd8ea6f8553feda Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 15 Oct 2001 15:15:45 +0000 Subject: [PATCH] * parse.y (yylex): disallow alpha-numeric and mbchar for terminator of %string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ parse.y | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8a73844365..f73d193e75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 16 00:07:06 2001 Nobuyoshi Nakada + + * parse.y (yylex): disallow alpha-numeric and mbchar for + terminator of %string. + Wed Oct 10 03:11:47 2001 Yukihiro Matsumoto * file.c (rb_stat_clone): should copy internal data too. diff --git a/parse.y b/parse.y index d7ed5b5f58..b1147fc97d 100644 --- a/parse.y +++ b/parse.y @@ -3528,6 +3528,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");